MockPreset

A built-in mock preset.

On this page

A built-in mock preset.

use sponsorkit::MockPreset;

pub enum MockPreset {
    SignedOut,
    None,
    ActiveMonthly,
    OneTime,
    Cancelled,
    Org,
}

Variants#

VariantWire valueMeaning
SignedOutsigned-outSigned out.
NonenoneSigned in, no contributions.
ActiveMonthlyactive-monthlyAn active $5/month contribution.
OneTimeone-timeA paid $25 one-time contribution.
CancelledcancelledA cancelled monthly contribution.
OrgorgAn active $10/month contribution through an organization.

SignedOut#

Wire value: signed-out

Signed out.

None#

Wire value: none

Signed in, no contributions.

ActiveMonthly#

Wire value: active-monthly

An active $5/month contribution.

OneTime#

Wire value: one-time

A paid $25 one-time contribution.

Cancelled#

Wire value: cancelled

A cancelled monthly contribution.

Org#

Wire value: org

An active $10/month contribution through an organization.

Associated constants#

ALL#

pub const ALL: [MockPreset; 6] = [
    MockPreset::SignedOut,
    MockPreset::None,
    MockPreset::ActiveMonthly,
    MockPreset::OneTime,
    MockPreset::Cancelled,
    MockPreset::Org,
];

All presets.

Methods#

as_str#

pub fn as_str(self) -> &'static str

The preset name, e.g. "active-monthly".

Returns: &'static str

Trait implementations#

  • impl Clone for MockPreset
  • impl Copy for MockPreset
  • impl Debug for MockPreset
  • impl Display for MockPreset
  • impl Eq for MockPreset
  • impl FromStr for MockPreset
  • impl Hash for MockPreset
  • impl PartialEq for MockPreset