pub struct VerifierOptions {
    pub method_scope: Option<MethodScope>,
    pub method_type: Option<Vec<MethodType>>,
    pub challenge: Option<String>,
    pub domain: Option<String>,
    pub purpose: Option<ProofPurpose>,
    pub allow_expired: Option<bool>,
}
Expand description

Holds additional options for verifying a proof with CoreDocument::verify_data.

Fields§

§method_scope: Option<MethodScope>

[`DocumentVerifier::method_scope’].

§method_type: Option<Vec<MethodType>>

[`DocumentVerifier::method_type’].

§challenge: Option<String>

[`DocumentVerifier::challenge’].

§domain: Option<String>

[`DocumentVerifier::domain’].

§purpose: Option<ProofPurpose>

[`DocumentVerifier::purpose’].

§allow_expired: Option<bool>

[`DocumentVerifier::allow_expired’].

Implementations§

source§

impl VerifierOptions

source

pub fn new() -> Self

Creates a new VerifierOptions with all options unset.

source

pub fn method_scope(self, method_scope: MethodScope) -> Self

See [`DocumentVerifier::method_scope’].

source

pub fn method_type(self, method_type: Vec<MethodType>) -> Self

See [`DocumentVerifier::method_type’].

source

pub fn challenge(self, challenge: String) -> Self

See [`DocumentVerifier::challenge’].

source

pub fn domain(self, domain: String) -> Self

See [`DocumentVerifier::domain’].

source

pub fn purpose(self, purpose: ProofPurpose) -> Self

See [`DocumentVerifier::purpose’].

source

pub fn allow_expired(self, allow_expired: bool) -> Self

See [`DocumentVerifier::allow_expired’].

Trait Implementations§

source§

impl Clone for VerifierOptions

source§

fn clone(&self) -> VerifierOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VerifierOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VerifierOptions

source§

fn default() -> VerifierOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for VerifierOptions

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for VerifierOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> FmtJson for Twhere T: ToJson,

source§

fn fmt_json(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Format this as a JSON string or pretty-JSON string based on whether the # format flag was used.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromJson for Twhere T: for<'de> Deserialize<'de>,

source§

fn from_json(json: &impl AsRef<str>) -> Result<Self, Error>

Deserialize Self from a string of JSON text.
source§

fn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error>

Deserialize Self from bytes of JSON text.
source§

fn from_json_value(json: Value) -> Result<Self, Error>

Deserialize Self from a serde_json::Value.
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToJson for Twhere T: Serialize,

source§

fn to_json(&self) -> Result<String, Error>

Serialize self as a string of JSON.
source§

fn to_json_vec(&self) -> Result<Vec<u8, Global>, Error>

Serialize self as a JSON byte vector.
source§

fn to_json_value(&self) -> Result<Value, Error>

Serialize self as a serde_json::Value.
source§

fn to_json_pretty(&self) -> Result<String, Error>

Serialize self as a pretty-printed string of JSON.
source§

fn to_jcs(&self) -> Result<Vec<u8, Global>, Error>

Serialize self as a JSON byte vector, normalized using JSON Canonicalization Scheme (JCS).
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,