Struct identity_iota::did::DocumentBuilder
source · [−]pub struct DocumentBuilder<D = CoreDID, T = BTreeMap<String, Value, Global>, U = BTreeMap<String, Value, Global>, V = BTreeMap<String, Value, Global>> where
D: DID + KeyComparable, { /* private fields */ }
Expand description
A DocumentBuilder
is used to generate a customized Document
.
Implementations
sourceimpl<D, T, U, V> DocumentBuilder<D, T, U, V> where
D: DID + KeyComparable,
impl<D, T, U, V> DocumentBuilder<D, T, U, V> where
D: DID + KeyComparable,
sourcepub fn new(properties: T) -> DocumentBuilder<D, T, U, V>
pub fn new(properties: T) -> DocumentBuilder<D, T, U, V>
Creates a new DocumentBuilder
.
sourcepub fn id(self, value: D) -> DocumentBuilder<D, T, U, V>
pub fn id(self, value: D) -> DocumentBuilder<D, T, U, V>
Sets the id
value.
sourcepub fn controller(self, value: D) -> DocumentBuilder<D, T, U, V>
pub fn controller(self, value: D) -> DocumentBuilder<D, T, U, V>
Adds a value to the controller
set.
sourcepub fn also_known_as(self, value: Url) -> DocumentBuilder<D, T, U, V>
pub fn also_known_as(self, value: Url) -> DocumentBuilder<D, T, U, V>
Adds a value to the alsoKnownAs
set.
sourcepub fn verification_method(
self,
value: VerificationMethod<D, U>
) -> DocumentBuilder<D, T, U, V>
pub fn verification_method(
self,
value: VerificationMethod<D, U>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the verificationMethod
set.
sourcepub fn authentication(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
pub fn authentication(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the authentication
set.
sourcepub fn assertion_method(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
pub fn assertion_method(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the assertionMethod
set.
sourcepub fn key_agreement(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
pub fn key_agreement(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the keyAgreement
set.
sourcepub fn capability_delegation(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
pub fn capability_delegation(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the capabilityDelegation
set.
sourcepub fn capability_invocation(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
pub fn capability_invocation(
self,
value: impl Into<MethodRef<D, U>>
) -> DocumentBuilder<D, T, U, V>
Adds a value to the capabilityInvocation
set.
sourcepub fn service(self, value: Service<D, V>) -> DocumentBuilder<D, T, U, V>
pub fn service(self, value: Service<D, V>) -> DocumentBuilder<D, T, U, V>
Adds a value to the service
set.
sourcepub fn build(self) -> Result<CoreDocument<D, T, U, V>, Error>
pub fn build(self) -> Result<CoreDocument<D, T, U, V>, Error>
Returns a new Document
based on the DocumentBuilder
configuration.
Trait Implementations
sourceimpl<D, T, U, V> Clone for DocumentBuilder<D, T, U, V> where
D: Clone + DID + KeyComparable,
T: Clone,
U: Clone,
V: Clone,
impl<D, T, U, V> Clone for DocumentBuilder<D, T, U, V> where
D: Clone + DID + KeyComparable,
T: Clone,
U: Clone,
V: Clone,
sourcefn clone(&self) -> DocumentBuilder<D, T, U, V>
fn clone(&self) -> DocumentBuilder<D, T, U, V>
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, U, V> Debug for DocumentBuilder<D, T, U, V> where
D: Debug + DID + KeyComparable,
T: Debug,
U: Debug,
V: Debug,
impl<D, T, U, V> Debug for DocumentBuilder<D, T, U, V> where
D: Debug + DID + KeyComparable,
T: Debug,
U: Debug,
V: Debug,
sourceimpl<D, T, U, V> Default for DocumentBuilder<D, T, U, V> where
D: DID + KeyComparable,
T: Default,
impl<D, T, U, V> Default for DocumentBuilder<D, T, U, V> where
D: DID + KeyComparable,
T: Default,
sourcefn default() -> DocumentBuilder<D, T, U, V>
fn default() -> DocumentBuilder<D, T, U, V>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<D, T, U, V> RefUnwindSafe for DocumentBuilder<D, T, U, V> where
D: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
V: RefUnwindSafe,
impl<D, T, U, V> Send for DocumentBuilder<D, T, U, V> where
D: Send,
T: Send,
U: Send,
V: Send,
impl<D, T, U, V> Sync for DocumentBuilder<D, T, U, V> where
D: Sync,
T: Sync,
U: Sync,
V: Sync,
impl<D, T, U, V> Unpin for DocumentBuilder<D, T, U, V> where
D: Unpin,
T: Unpin,
U: Unpin,
V: Unpin,
impl<D, T, U, V> UnwindSafe for DocumentBuilder<D, T, U, V> where
D: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
V: 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