Enum vade::VadePluginResultValue
source · [−]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
sourceimpl<T> VadePluginResultValue<T>
impl<T> VadePluginResultValue<T>
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
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