Struct identity_did::service::Service
source · pub struct Service<D = CoreDID, T = Object>where
D: DID,{ /* private fields */ }
Expand description
A DID Document Service used to enable trusted interactions associated with a DID subject.
Implementations§
source§impl<D, T> Service<D, T>where
D: DID,
impl<D, T> Service<D, T>where D: DID,
sourcepub fn builder(properties: T) -> ServiceBuilder<D, T>
pub fn builder(properties: T) -> ServiceBuilder<D, T>
Creates a ServiceBuilder
to configure a new Service
.
This is the same as ServiceBuilder::new()
.
sourcepub fn from_builder(builder: ServiceBuilder<D, T>) -> Result<Self>
pub fn from_builder(builder: ServiceBuilder<D, T>) -> Result<Self>
Returns a new Service
based on the ServiceBuilder
configuration.
sourcepub fn service_endpoint(&self) -> &ServiceEndpoint
pub fn service_endpoint(&self) -> &ServiceEndpoint
Returns a reference to the Service
endpoint.
sourcepub fn service_endpoint_mut(&mut self) -> &mut ServiceEndpoint
pub fn service_endpoint_mut(&mut self) -> &mut ServiceEndpoint
Returns a mutable reference to the Service
endpoint.
sourcepub fn properties(&self) -> &T
pub fn properties(&self) -> &T
Returns a reference to the custom Service
properties.
sourcepub fn properties_mut(&mut self) -> &mut T
pub fn properties_mut(&mut self) -> &mut T
Returns a mutable reference to the custom Service
properties.
Trait Implementations§
source§impl<'de, D, T> Deserialize<'de> for Service<D, T>where
D: DID + Deserialize<'de>,
T: Deserialize<'de>,
impl<'de, D, T> Deserialize<'de> for Service<D, T>where D: DID + Deserialize<'de>, T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<D, T> Diff for Service<D, T>where
D: Diff + DID + Serialize + for<'de> Deserialize<'de>,
T: Diff + Serialize + for<'de> Deserialize<'de> + Default,
impl<D, T> Diff for Service<D, T>where D: Diff + DID + Serialize + for<'de> Deserialize<'de>, T: Diff + Serialize + for<'de> Deserialize<'de> + Default,
§type Type = DiffService<D, T>
type Type = DiffService<D, T>
👎Deprecated since 0.5.0: diff chain features are slated for removal
The Corresponding Diff Type for the implemented Type.
source§fn diff(&self, other: &Self) -> Result<Self::Type>
fn diff(&self, other: &Self) -> Result<Self::Type>
👎Deprecated since 0.5.0: diff chain features are slated for removal
Finds the difference between two types;
self
and other
and returns Self::Type
source§fn merge(&self, diff: Self::Type) -> Result<Self>
fn merge(&self, diff: Self::Type) -> Result<Self>
👎Deprecated since 0.5.0: diff chain features are slated for removal
Merges a
Self::Type
with Self
source§impl<D, T> KeyComparable for Service<D, T>where
D: DID,
impl<D, T> KeyComparable for Service<D, T>where D: DID,
source§impl<D, T: PartialEq> PartialEq<Service<D, T>> for Service<D, T>where
D: DID + PartialEq,
impl<D, T: PartialEq> PartialEq<Service<D, T>> for Service<D, T>where D: DID + PartialEq,
source§impl<D: DID + Sized> TryFrom<&Service<D, BTreeMap<String, Value, Global>>> for RevocationBitmap
impl<D: DID + Sized> TryFrom<&Service<D, BTreeMap<String, Value, Global>>> for RevocationBitmap
impl<D, T> StructuralPartialEq for Service<D, T>where D: DID,
Auto Trait Implementations§
impl<D, T> RefUnwindSafe for Service<D, T>where D: RefUnwindSafe, T: RefUnwindSafe,
impl<D, T> Send for Service<D, T>where D: Send, T: Send,
impl<D, T> Sync for Service<D, T>where D: Sync, T: Sync,
impl<D, T> Unpin for Service<D, T>where D: Unpin, T: Unpin,
impl<D, T> UnwindSafe for Service<D, T>where D: UnwindSafe, T: UnwindSafe,
Blanket Implementations§
source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere T: for<'de> Deserialize<'de>,
source§fn from_json(json: &impl AsRef<str>) -> Result<Self, Error>
fn from_json(json: &impl AsRef<str>) -> Result<Self, Error>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error>
fn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize
Self
from a serde_json::Value
.source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere T: Serialize,
source§fn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize
self
as a serde_json::Value
.