Struct identity_iota::did::MethodBuilder
source · [−]pub struct MethodBuilder<D = CoreDID, T = BTreeMap<String, Value, Global>> where
D: DID, { /* private fields */ }
Expand description
A MethodBuilder
is used to generate a customized Method
.
Implementations
sourceimpl<D, T> MethodBuilder<D, T> where
D: DID,
impl<D, T> MethodBuilder<D, T> where
D: DID,
sourcepub fn new(properties: T) -> MethodBuilder<D, T>
pub fn new(properties: T) -> MethodBuilder<D, T>
Creates a new MethodBuilder
.
sourcepub fn id(self, value: DIDUrl<D>) -> MethodBuilder<D, T>
pub fn id(self, value: DIDUrl<D>) -> MethodBuilder<D, T>
Sets the id
value of the generated VerificationMethod
.
sourcepub fn controller(self, value: D) -> MethodBuilder<D, T>
pub fn controller(self, value: D) -> MethodBuilder<D, T>
Sets the controller
value of the generated VerificationMethod
.
sourcepub fn type_(self, value: MethodType) -> MethodBuilder<D, T>
pub fn type_(self, value: MethodType) -> MethodBuilder<D, T>
Sets the type
value of the generated verification VerificationMethod
.
sourcepub fn data(self, value: MethodData) -> MethodBuilder<D, T>
pub fn data(self, value: MethodData) -> MethodBuilder<D, T>
Sets the data
value of the generated VerificationMethod
.
sourcepub fn build(self) -> Result<VerificationMethod<D, T>, Error>
pub fn build(self) -> Result<VerificationMethod<D, T>, Error>
Returns a new VerificationMethod
based on the MethodBuilder
configuration.
Trait Implementations
sourceimpl<D, T> Clone for MethodBuilder<D, T> where
D: Clone + DID,
T: Clone,
impl<D, T> Clone for MethodBuilder<D, T> where
D: Clone + DID,
T: Clone,
sourcefn clone(&self) -> MethodBuilder<D, T>
fn clone(&self) -> MethodBuilder<D, T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<D, T> Default for MethodBuilder<D, T> where
D: DID,
T: Default,
impl<D, T> Default for MethodBuilder<D, T> where
D: DID,
T: Default,
sourcefn default() -> MethodBuilder<D, T>
fn default() -> MethodBuilder<D, T>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<D, T> RefUnwindSafe for MethodBuilder<D, T> where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<D, T> Send for MethodBuilder<D, T> where
D: Send,
T: Send,
impl<D, T> Sync for MethodBuilder<D, T> where
D: Sync,
T: Sync,
impl<D, T> Unpin for MethodBuilder<D, T> where
D: Unpin,
T: Unpin,
impl<D, T> UnwindSafe for MethodBuilder<D, T> where
D: UnwindSafe,
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more