Struct identity_iota::iota_core::DiffMessage
source · [−]pub struct DiffMessage { /* private fields */ }
diff chain features are slated for removal
Expand description
Defines the difference between two IotaDocument
JSON representations, published to
the Tangle on a differentiation chain index.
Implementations
sourceimpl DiffMessage
impl DiffMessage
sourcepub fn new(
current: &IotaDocument,
updated: &IotaDocument,
previous_message_id: MessageId
) -> Result<DiffMessage, Error>
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn new(
current: &IotaDocument,
updated: &IotaDocument,
previous_message_id: MessageId
) -> Result<DiffMessage, Error>
diff chain features are slated for removal
Construct a new DiffMessage
by diffing the JSON representations of current
and updated
.
The previous_message_id
is included verbatim in the output, and the proof
is None
. To
set a proof, use the set_signature()
method.
sourcepub fn id(&self) -> &IotaDID
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn id(&self) -> &IotaDID
diff chain features are slated for removal
Returns the DID of associated DID Document.
sourcepub fn diff(&self) -> &DiffIotaDocument
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn diff(&self) -> &DiffIotaDocument
diff chain features are slated for removal
Returns the raw contents of the DID Document diff.
sourcepub fn message_id(&self) -> &MessageId
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn message_id(&self) -> &MessageId
diff chain features are slated for removal
Returns the DID of associated DID Document.
sourcepub fn set_message_id(&mut self, message_id: MessageId)
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn set_message_id(&mut self, message_id: MessageId)
diff chain features are slated for removal
Sets the DID of the associated DID Document.
sourcepub fn previous_message_id(&self) -> &MessageId
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn previous_message_id(&self) -> &MessageId
diff chain features are slated for removal
Returns the Tangle message id of the previous DID Document diff.
sourcepub fn set_previous_message_id(&mut self, message_id: MessageId)
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn set_previous_message_id(&mut self, message_id: MessageId)
diff chain features are slated for removal
Sets the Tangle message id of the previous DID Document diff.
sourcepub fn proof(&self) -> Option<&Proof>
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn proof(&self) -> Option<&Proof>
diff chain features are slated for removal
Returns a reference to the proof.
sourcepub fn merge(&self, document: &IotaDocument) -> Result<IotaDocument, Error>
👎 Deprecated since 0.5.0: diff chain features are slated for removal
pub fn merge(&self, document: &IotaDocument) -> Result<IotaDocument, Error>
diff chain features are slated for removal
Returns a new DID Document which is the result of merging self
with the given Document.
Trait Implementations
sourceimpl Clone for DiffMessage
impl Clone for DiffMessage
sourcefn clone(&self) -> DiffMessage
fn clone(&self) -> DiffMessage
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 Debug for DiffMessage
impl Debug for DiffMessage
sourceimpl<'de> Deserialize<'de> for DiffMessage
impl<'de> Deserialize<'de> for DiffMessage
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<DiffMessage, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<DiffMessage, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl GetSignature for DiffMessage
impl GetSignature for DiffMessage
sourceimpl GetSignatureMut for DiffMessage
impl GetSignatureMut for DiffMessage
sourcefn signature_mut(&mut self) -> Option<&mut Proof>
fn signature_mut(&mut self) -> Option<&mut Proof>
Returns a mutable reference to the Proof
object, if any.
sourceimpl PartialEq<DiffMessage> for DiffMessage
impl PartialEq<DiffMessage> for DiffMessage
sourcefn eq(&self, other: &DiffMessage) -> bool
fn eq(&self, other: &DiffMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DiffMessage) -> bool
fn ne(&self, other: &DiffMessage) -> bool
This method tests for !=
.
sourceimpl Serialize for DiffMessage
impl Serialize for DiffMessage
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl SetSignature for DiffMessage
impl SetSignature for DiffMessage
sourcefn set_signature(&mut self, value: Proof)
fn set_signature(&mut self, value: Proof)
Sets the Proof
object of self
.
sourceimpl TangleRef for DiffMessage
impl TangleRef for DiffMessage
fn did(&self) -> &IotaDID
fn message_id(&self) -> &MessageId
fn set_message_id(&mut self, message_id: MessageId)
fn previous_message_id(&self) -> &MessageId
fn set_previous_message_id(&mut self, message_id: MessageId)
sourceimpl TryFromMessage for DiffMessage
impl TryFromMessage for DiffMessage
fn try_from_message(message: &Message, did: &IotaDID) -> Option<DiffMessage>
sourceimpl TryMethod for DiffMessage
impl TryMethod for DiffMessage
sourceconst TYPE: MethodUriType = MethodUriType::Relative
const TYPE: MethodUriType = MethodUriType::Relative
Flag that determines whether absolute or rleative URI
sourcefn method<D, U>(method: &VerificationMethod<D, U>) -> Option<String> where
D: DID,
fn method<D, U>(method: &VerificationMethod<D, U>) -> Option<String> where
D: DID,
Returns an absolute or relative method URI, if any, depending on the MethodUriType
. Read more
sourcefn try_method<D, U>(method: &VerificationMethod<D, U>) -> Result<String, Error> where
D: DID,
fn try_method<D, U>(method: &VerificationMethod<D, U>) -> Result<String, Error> where
D: DID,
Returns String representation of absolute or relative method URI. Read more
impl StructuralPartialEq for DiffMessage
Auto Trait Implementations
impl RefUnwindSafe for DiffMessage
impl Send for DiffMessage
impl Sync for DiffMessage
impl Unpin for DiffMessage
impl UnwindSafe for DiffMessage
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> FromJson for T where
T: for<'de> Deserialize<'de>,
impl<T> FromJson for T where
T: for<'de> Deserialize<'de>,
sourcefn 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.
sourcefn 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.
sourcefn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize Self
from a [serde_json::Value
].
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>
sourceimpl<T> ToJson for T where
T: Serialize,
impl<T> ToJson for T where
T: Serialize,
sourcefn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize self
as a [serde_json::Value
].
sourcefn to_json_pretty(&self) -> Result<String, Error>
fn to_json_pretty(&self) -> Result<String, Error>
Serialize self
as a pretty-printed string of JSON.
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