pub struct Contact { /* private fields */ }
Expand description

Contact is an abstraction responsible for storing user’s public data (mainly - public keys). It is designed to share users’ public keys in cryptographically verifiable way. Public keys together with metadata are organised into verifiable events chain exactly like crate::Profile. There are two ways to get Contact:

  1. From another user (in this case Contact will be cryptographically verified)
  2. Generate one from user’s own Profile

Public keys from Contact can be used for many purposes, e.g. running key exchange, or signing&encrypting data.

Examples

Creating Contact from Profile

TODO

Implementations

Return unique identifier, which equals to Profile’s identifier

Return change history chain

Create a new Contact.

Verify cryptographically whole event chain. Also verify sequence correctness

Update Contact by using new change events

Get PublicKey. Key is uniquely identified by the specified label.

Get EventIdentifier of the last known event

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Try cloning a object and return an Err in case of failure.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Decode a slice.

Encode the type into an Encoded type.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more