Enum KnownConstraint
pub enum KnownConstraint {
AllowedMerchant {
allowed_merchants: Vec<DisclosableEntry<Entity>>,
},
LineItems {
items: Vec<DisclosableEntry<LineItemEntry>>,
},
AllowedPayee {
allowed_payees: Vec<DisclosableEntry<Entity>>,
},
PaymentAmount {
currency: String,
min: Option<i64>,
max: Option<i64>,
},
PaymentBudget {
currency: String,
min: Option<i64>,
max: i64,
},
PaymentRecurrence {
frequency: String,
start_date: String,
end_date: Option<String>,
number: Option<u32>,
},
AgentRecurrence {
frequency: String,
start_date: String,
end_date: String,
max_occurrences: Option<u32>,
},
PaymentReference {
conditional_transaction_id: String,
},
}Expand description
Constraint types this build recognizes and can evaluate.
Variants§
AllowedMerchant
Merchant allowlist for checkout mandates.
The wire field is allowed for both allowlists (constraints.md §4.1
and §4.3). The Rust name stays specific because two variants would
otherwise both carry a field called allowed, and the same
rename-on-the-wire idiom already appears on PaymentInstrument::type.
Fields
allowed_merchants: Vec<DisclosableEntry<Entity>>LineItems
Product selection constraints for checkout mandates.
Fields
items: Vec<DisclosableEntry<LineItemEntry>>AllowedPayee
Payee allowlist for payment mandates.
Fields
allowed_payees: Vec<DisclosableEntry<Entity>>PaymentAmount
Per-transaction amount range.
PaymentBudget
Cumulative budget cap.
min is a per-transaction floor, distinct from max’s cumulative
ceiling (constraints.md §4.5). The specification requires it to be
positive when present; enforcing that belongs to the checker stage, and
carrying the field is what lets that stage see it at all.
PaymentRecurrence
Merchant-managed recurring payment.
AgentRecurrence
Agent-managed recurring purchase.
end_date is REQUIRED here and RECOMMENDED on PaymentRecurrence
(constraints.md §4.7 against §4.6). §7.4 gives the reason: a required
end date is what stops an open-ended agent-managed authorization, so an
agent-recurrence constraint without one is malformed and must not parse
into this variant.
PaymentReference
Cross-reference between checkout and payment mandates.
Trait Implementations§
Source§impl Clone for KnownConstraint
impl Clone for KnownConstraint
Source§fn clone(&self) -> KnownConstraint
fn clone(&self) -> KnownConstraint
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnownConstraint
impl Debug for KnownConstraint
Source§impl<'de> Deserialize<'de> for KnownConstraint
impl<'de> Deserialize<'de> for KnownConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for KnownConstraint
Source§impl From<KnownConstraint> for Constraint
impl From<KnownConstraint> for Constraint
Source§fn from(known: KnownConstraint) -> Self
fn from(known: KnownConstraint) -> Self
Wrap a recognized constraint that carries no additional fields.
This is a convenience over the recognized representation and asserts nothing about verification. The opaque verified types deliberately have no such conversion.
Source§impl PartialEq for KnownConstraint
impl PartialEq for KnownConstraint
Source§impl Serialize for KnownConstraint
impl Serialize for KnownConstraint
impl StructuralPartialEq for KnownConstraint
Auto Trait Implementations§
impl Freeze for KnownConstraint
impl RefUnwindSafe for KnownConstraint
impl Send for KnownConstraint
impl Sync for KnownConstraint
impl Unpin for KnownConstraint
impl UnsafeUnpin for KnownConstraint
impl UnwindSafe for KnownConstraint
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more