[][src]Enum vade::VadePluginResultValue

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

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

impl<T> VadePluginResultValue<T>[src]

pub fn unwrap(self) -> T[src]

Unwraps inner value like:

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

Auto Trait Implementations

impl<T> RefUnwindSafe for VadePluginResultValue<T> where
    T: RefUnwindSafe

impl<T> Send for VadePluginResultValue<T> where
    T: Send

impl<T> Sync for VadePluginResultValue<T> where
    T: Sync

impl<T> Unpin for VadePluginResultValue<T> where
    T: Unpin

impl<T> UnwindSafe for VadePluginResultValue<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.