Struct ockam_entity::Entity [−][src]
pub struct Entity { /* fields omitted */ }
Implementations
pub async fn remove_profile<I: Into<ProfileIdentifier>>(
&mut self,
profile_id: I
) -> Result<()>
pub async fn create_secure_channel_listener(
&mut self,
address: impl Into<Address>,
trust_policy: impl TrustPolicy
) -> Result<()>
pub async fn create_secure_channel(
&mut self,
route: impl Into<Route>,
trust_policy: impl TrustPolicy
) -> Result<Address>
Trait Implementations
fn identifier<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ProfileIdentifier>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn identifier<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ProfileIdentifier>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return unique Profile
identifier, which is equal to sha256 of the root public key
Create new key.
Rotate existing key.
Get Secret
key.
Get Secret
key.
Get PublicKey
.
Get PublicKey
.
Create an authentication proof based on the given state
fn verify_auth_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
state_slice: &'life1 [u8],
peer_id: &'life2 ProfileIdentifier,
proof_slice: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn verify_auth_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
state_slice: &'life1 [u8],
peer_id: &'life2 ProfileIdentifier,
proof_slice: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Verify a proof based on the given state, proof and profile.
fn add_change<'life0, 'async_trait>(
&'life0 mut self,
change_event: ProfileChangeEvent
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn add_change<'life0, 'async_trait>(
&'life0 mut self,
change_event: ProfileChangeEvent
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Add a change event.
Return change history chain
Verify the whole change event chain
Return all known to this profile Contact
s
fn get_contact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
contact_id: &'life1 ProfileIdentifier
) -> Pin<Box<dyn Future<Output = Result<Option<Contact>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_contact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
contact_id: &'life1 ProfileIdentifier
) -> Pin<Box<dyn Future<Output = Result<Option<Contact>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Return Contact
with given ProfileIdentifier
Verify cryptographically whole event chain. Also verify sequence correctness
fn verify_and_update_contact<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
profile_id: &'life1 ProfileIdentifier,
changes: &'life2 [ProfileChangeEvent]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn verify_and_update_contact<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
profile_id: &'life1 ProfileIdentifier,
changes: &'life2 [ProfileChangeEvent]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Verify and update known Contact
with new ProfileChangeEvent
s
Auto Trait Implementations
impl !RefUnwindSafe for Entity
impl !UnwindSafe for Entity
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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