pub enum Condition {
Client(ClientConditionBody),
Issuer(IssuerConditionBody),
Unknown {
type_iri: String,
},
}Expand description
Discriminated union of recognised condition types.
Parsed from the @type discriminator in JSON-LD. Unknown types
land in the Condition::Unknown arm with the offending IRI
preserved so the document still parses, dispatch returns
NotApplicable, and the write-time validator can echo the
rejected type verbatim in a 422 response.
Variants§
Client(ClientConditionBody)
acl:ClientCondition — gate on the requesting client identity.
Issuer(IssuerConditionBody)
acl:IssuerCondition — gate on the token issuer.
Unknown
Any condition type the server does not recognise. The type_iri
is preserved verbatim from the @type (or Turtle rdf:type)
discriminator.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
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
Mutably borrows from an owned value. Read more