Struct identity_iota::client::CredentialValidationOptions
source · [−]#[non_exhaustive]pub struct CredentialValidationOptions {
pub earliest_expiry_date: Option<Timestamp>,
pub latest_issuance_date: Option<Timestamp>,
pub status: StatusCheck,
pub verifier_options: VerifierOptions,
}
Expand description
Options to declare validation criteria for credentials.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.earliest_expiry_date: Option<Timestamp>
Declares that the credential is not considered valid if it expires before this
Timestamp
.
Uses the current datetime during validation if not set.
latest_issuance_date: Option<Timestamp>
Declares that the credential is not considered valid if it was issued later than this
Timestamp
.
Uses the current datetime during validation if not set.
status: StatusCheck
Validation behaviour for credentialStatus
.
Default: StatusCheck::Strict
.
verifier_options: VerifierOptions
Options which affect the verification of the signature on the credential.
Implementations
sourceimpl CredentialValidationOptions
impl CredentialValidationOptions
sourcepub fn new() -> CredentialValidationOptions
pub fn new() -> CredentialValidationOptions
Constructor that sets all options to their defaults.
sourcepub fn earliest_expiry_date(
self,
timestamp: Timestamp
) -> CredentialValidationOptions
pub fn earliest_expiry_date(
self,
timestamp: Timestamp
) -> CredentialValidationOptions
Declare that the credential is not considered valid if it expires before this Timestamp
.
Uses the current datetime during validation if not set.
sourcepub fn latest_issuance_date(
self,
timestamp: Timestamp
) -> CredentialValidationOptions
pub fn latest_issuance_date(
self,
timestamp: Timestamp
) -> CredentialValidationOptions
Declare that the credential is not considered valid if it was issued later than this Timestamp
.
Uses the current datetime during validation if not set.
sourcepub fn status_check(
self,
status_check: StatusCheck
) -> CredentialValidationOptions
pub fn status_check(
self,
status_check: StatusCheck
) -> CredentialValidationOptions
Sets the validation behaviour for credentialStatus
.
sourcepub fn verifier_options(
self,
options: VerifierOptions
) -> CredentialValidationOptions
pub fn verifier_options(
self,
options: VerifierOptions
) -> CredentialValidationOptions
Set options which affect the verification of the signature on the credential.
Trait Implementations
sourceimpl Clone for CredentialValidationOptions
impl Clone for CredentialValidationOptions
sourcefn clone(&self) -> CredentialValidationOptions
fn clone(&self) -> CredentialValidationOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CredentialValidationOptions
impl Debug for CredentialValidationOptions
sourceimpl Default for CredentialValidationOptions
impl Default for CredentialValidationOptions
sourcefn default() -> CredentialValidationOptions
fn default() -> CredentialValidationOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CredentialValidationOptions
impl<'de> Deserialize<'de> for CredentialValidationOptions
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<CredentialValidationOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CredentialValidationOptions, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for CredentialValidationOptions
impl Serialize for CredentialValidationOptions
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CredentialValidationOptions
impl Send for CredentialValidationOptions
impl Sync for CredentialValidationOptions
impl Unpin for CredentialValidationOptions
impl UnwindSafe for CredentialValidationOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromJson for T where
T: for<'de> Deserialize<'de>,
impl<T> FromJson for T where
T: for<'de> Deserialize<'de>,
sourcefn from_json(json: &impl AsRef<str>) -> Result<Self, Error>
fn from_json(json: &impl AsRef<str>) -> Result<Self, Error>
Deserialize Self
from a string of JSON text.
sourcefn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error>
fn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error>
Deserialize Self
from bytes of JSON text.
sourcefn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize Self
from a [serde_json::Value
].
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToJson for T where
T: Serialize,
impl<T> ToJson for T where
T: Serialize,
sourcefn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize self
as a [serde_json::Value
].
sourcefn to_json_pretty(&self) -> Result<String, Error>
fn to_json_pretty(&self) -> Result<String, Error>
Serialize self
as a pretty-printed string of JSON.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more