pub enum VadePluginResultValue<T> {
    NotImplemented,
    Ignored,
    Success(T),
}
Expand description

Wrapper enum for a plugins return value

Variants

NotImplemented

Plugin does not implement this function. This is returned by default as the VadePlugin trait offers a default implementation for every function (which returns NotImplemented). So if a function is not explicitly implemented by a plugin itself, a call to this function will return NotImplemented.

Ignored

Plugin implements function but is not “interested” in fulfilling function call. This mostly signs that the responding plugin does not resolve/handle given method, e.g. a plugin may resolve dids with prefix did:example123 and not dids with prefix did:example456.

Success(T)

Plugin handled request and returned a value of type T. Note that Success values can be unwrapped. So if you know, that a plugin implements a function and handles requests of your method, you can call unwrap on it to fetch the underlying value of type T.

Implementations

Unwraps inner value like:

  • Success(T) unwraps successfully to T
  • NotImplemented and Ignored unwrap to errors

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.