CheckoutOutcome
The outcome of crate::Sponsorkit::open_checkout.
The outcome of crate::Sponsorkit::open_checkout.
Serializes as {"status":"contributed","contribution":{…}} or {"status":"unknown"}.
use sponsorkit::CheckoutOutcome;
pub enum CheckoutOutcome {
Contributed { contribution: Box<Contribution> },
Unknown,
}Variants#
| Variant | Wire value | Meaning |
|---|---|---|
Contributed | contributed | A new or changed contribution was detected. |
Unknown | unknown | Nothing was detected before the timeout or cancellation. |
Contributed#
Contributed { contribution: Box<Contribution> }Wire value: contributed
A new or changed contribution was detected.
contribution: The new or changed contribution.
Unknown#
Wire value: unknown
Nothing was detected before the timeout or cancellation.
Methods#
contribution#
pub fn contribution(&self) -> Option<&Contribution>The detected contribution, if any.
Returns: Option<&Contribution> (see Contribution)
Trait implementations#
impl Clone for CheckoutOutcomeimpl Debug for CheckoutOutcomeimpl Eq for CheckoutOutcomeimpl PartialEq for CheckoutOutcomeimpl Serialize for CheckoutOutcomeimpl<'de> Deserialize<'de> for CheckoutOutcome