[−][src]Struct identity_core::did::DID
Decentralized identity structure.
Fields
method_name: String
id_segments: Vec<String>
params: Option<Vec<Param>>
path_segments: Option<Vec<String>>
query: Option<String>
fragment: Option<String>
Implementations
impl DID
[src]
pub fn new(
name: String,
id_segments: Vec<String>,
params: Option<Vec<(String, Option<String>)>>,
path_segments: Option<Vec<String>>,
query: Option<String>,
fragment: Option<String>
) -> Result<Self>
[src]
name: String,
id_segments: Vec<String>,
params: Option<Vec<(String, Option<String>)>>,
path_segments: Option<Vec<String>>,
query: Option<String>,
fragment: Option<String>
) -> Result<Self>
Creates a new DID. params
and fragment
are both optional.
pub fn parse_from_str<T>(input: T) -> Result<Self> where
T: ToString,
[src]
T: ToString,
pub fn add_params(&mut self, params: Vec<Param>)
[src]
Method to add params to the DID.
pub fn add_path_segments(&mut self, path_segment: Vec<String>)
[src]
add path segments to the current DID.
pub fn add_query(&mut self, query: String)
[src]
add a query to the DID.
pub fn add_fragment(&mut self, fragment: String)
[src]
Method to add a fragment to the DID.
Trait Implementations
impl Debug for DID
[src]
impl Default for DID
[src]
impl Display for DID
[src]
Display trait for the DID struct.
impl Eq for DID
[src]
impl PartialEq<DID> for DID
[src]
impl StructuralEq for DID
[src]
impl StructuralPartialEq for DID
[src]
Auto Trait Implementations
impl RefUnwindSafe for DID
impl Send for DID
impl Sync for DID
impl Unpin for DID
impl UnwindSafe for DID
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,