Targets
The accounts to check, as given by the maintainer ({ github, open_collective }).
On this page
The accounts to check, as given by the maintainer ({ github, open_collective }).
Used by crate::server::verify_session; crate::Options has the same two fields.
use sponsorkit::Targets;
pub struct Targets {
pub github: Option<String>,
pub open_collective: Option<String>,
}Fields#
github#
pub github: Option<String>GitHub Sponsors login (user or organization).
open_collective#
pub open_collective: Option<String>Open Collective collective slug.
Methods#
github#
pub fn github(login: impl Into<String>) -> SelfA target set with only a GitHub login.
| Parameter | Type |
|---|---|
login | impl Into<String> |
Returns: Self
open_collective#
pub fn open_collective(slug: impl Into<String>) -> SelfA target set with only an Open Collective slug.
| Parameter | Type |
|---|---|
slug | impl Into<String> |
Returns: Self
with_github#
pub fn with_github(self, login: impl Into<String>) -> SelfAdds (or replaces) the GitHub login.
| Parameter | Type |
|---|---|
login | impl Into<String> |
Returns: Self
with_open_collective#
pub fn with_open_collective(self, slug: impl Into<String>) -> SelfAdds (or replaces) the Open Collective slug.
| Parameter | Type |
|---|---|
slug | impl Into<String> |
Returns: Self
canonical#
pub fn canonical(&self) -> Result<TargetSet>Validates and canonicalizes this set.
Returns: Result<TargetSet> (see Result, TargetSet)
Trait implementations#
impl Clone for Targetsimpl Debug for Targetsimpl Default for Targetsimpl Eq for Targetsimpl PartialEq for Targets