pub struct Contact { /* private fields */ }Implementations§
Source§impl Contact
impl Contact
Sourcepub fn export_plain(&self) -> Result<Zeroizing<Vec<u8>>, Error>
pub fn export_plain(&self) -> Result<Zeroizing<Vec<u8>>, Error>
Export the contact into a versioned, explicit plaintext blob.
Caller MUST encrypt this blob before storing/transmitting it.
Returns Zeroizing<Vec
Sourcepub fn import_plain(blob: &[u8]) -> Result<Self, Error>
pub fn import_plain(blob: &[u8]) -> Result<Self, Error>
Import a plaintext blob created by export_plain. The blob MUST have been authenticated and decrypted by the caller before calling this.
Source§impl Contact
impl Contact
pub fn save_backup(&mut self)
pub fn restore_backup(&mut self)
Source§impl Contact
impl Contact
pub fn init_smp( &mut self, question: String, answer: String, ) -> Result<ContactOutput, Error>
pub fn provide_smp_answer( &mut self, answer_struct: UserAnswer, ) -> Result<ContactOutput, Error>
Source§impl Contact
impl Contact
pub fn i_confirm_message_has_been_sent(&mut self) -> Result<(), Error>
pub fn send_message( &mut self, message: &Zeroizing<String>, ) -> Result<ContactOutput, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Contact
impl RefUnwindSafe for Contact
impl Send for Contact
impl Sync for Contact
impl Unpin for Contact
impl UnsafeUnpin for Contact
impl UnwindSafe for Contact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more