Frequency

How often a contribution is charged.

On this page

How often a contribution is charged.

use sponsorkit::Frequency;

pub enum Frequency {
    OneTime,
    Monthly,
    Yearly,
}

Variants#

VariantWire valueMeaning
OneTimeone_timeA single payment.
MonthlymonthlyEvery month.
YearlyyearlyEvery year (Open Collective only).

OneTime#

Wire value: one_time

A single payment.

Monthly#

Wire value: monthly

Every month.

Yearly#

Wire value: yearly

Every year (Open Collective only).

Methods#

as_str#

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

The wire spelling: one_time, monthly or yearly.

Returns: &'static str

Trait implementations#

  • impl Clone for Frequency
  • impl Copy for Frequency
  • impl Debug for Frequency
  • impl Display for Frequency
  • impl Eq for Frequency
  • impl FromStr for Frequency
  • impl Hash for Frequency
  • impl PartialEq for Frequency
  • impl Serialize for Frequency
  • impl<'de> Deserialize<'de> for Frequency