Trait ockam_entity::ProfileContacts [−][src]
pub trait ProfileContacts {
fn contacts(&self) -> Result<ContactsDb>;
fn to_contact(&self) -> Result<Contact>;
fn serialize_to_contact(&self) -> Result<Vec<u8>>;
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>;
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>;
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>;
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>;
}Expand description
Profile contact management.
Required methods
fn contacts(&self) -> Result<ContactsDb>[src]
fn contacts(&self) -> Result<ContactsDb>[src]Return all known to this profile Contacts
fn to_contact(&self) -> Result<Contact>[src]
fn to_contact(&self) -> Result<Contact>[src]Convert [Profile] to Contact
fn serialize_to_contact(&self) -> Result<Vec<u8>>[src]
fn serialize_to_contact(&self) -> Result<Vec<u8>>[src]Serialize [Profile] to Contact in binary form for storing/transferring over the network
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>[src]
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>[src]Return Contact with given ProfileIdentifier
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>[src]
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>[src]Verify cryptographically whole event chain. Also verify sequence correctness
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>[src]
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>[src]Verify and add new Contact to [Profile]’s Contact list
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>[src]
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>[src]Verify and update known Contact with new ProfileChangeEvents
Implementors
impl ProfileContacts for Entity[src]
impl ProfileContacts for Entity[src]fn contacts(&self) -> Result<ContactsDb>[src]
fn to_contact(&self) -> Result<Contact>[src]
fn serialize_to_contact(&self) -> Result<Vec<u8>>[src]
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>[src]
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>[src]
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>[src]
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>[src]
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>
impl ProfileContacts for ProfileSync[src]
impl ProfileContacts for ProfileSync[src]fn contacts(&self) -> Result<ContactsDb>[src]
fn to_contact(&self) -> Result<Contact>[src]
fn serialize_to_contact(&self) -> Result<Vec<u8>>[src]
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>[src]
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>[src]
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>[src]
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>[src]
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>
impl<V: ProfileVault> ProfileContacts for ProfileImpl<V>[src]
impl<V: ProfileVault> ProfileContacts for ProfileImpl<V>[src]fn contacts(&self) -> Result<ContactsDb>[src]
fn to_contact(&self) -> Result<Contact>[src]
fn serialize_to_contact(&self) -> Result<Vec<u8>>[src]
fn get_contact(&self, id: &ProfileIdentifier) -> Result<Option<Contact>>[src]
fn verify_contact(&mut self, contact: &Contact) -> Result<bool>[src]
fn verify_and_add_contact(&mut self, contact: Contact) -> Result<bool>[src]
fn verify_and_update_contact(
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>[src]
&mut self,
profile_id: &ProfileIdentifier,
change_events: Vec<ProfileChangeEvent>
) -> Result<bool>