Provider

A contribution provider.

On this page

A contribution provider.

use sponsorkit::Provider;

pub enum Provider {
    GitHub,
    OpenCollective,
}

Variants#

VariantWire valueMeaning
GitHubgithubGitHub Sponsors.
OpenCollectiveopen-collectiveOpen Collective.

GitHub#

Wire value: github

GitHub Sponsors.

OpenCollective#

Wire value: open-collective

Open Collective.

Methods#

as_str#

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

The wire spelling: "github" or "open-collective".

Returns: &'static str

parse#

pub fn parse(s: &str) -> Option<Provider>

Parses "github" or "open-collective".

ParameterType
s&str

Returns: Option<Provider> (see Provider)

Trait implementations#

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