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
.