pub struct ProteusCentral { /* private fields */ }Expand description
Proteus counterpart of crate::mls::MlsCentral
The big difference is that ProteusCentral doesn’t own its own keystore but must borrow it from the outside. Whether it’s exclusively for this struct’s purposes or it’s shared with our main struct, crate::mls::MlsCentral
Implementations§
Source§impl ProteusCentral
 
impl ProteusCentral
Sourcepub async fn try_new(keystore: &CryptoKeystore) -> Result<Self>
 
pub async fn try_new(keystore: &CryptoKeystore) -> Result<Self>
Initializes the ProteusCentral
Sourcepub async fn session_from_prekey(
    &mut self,
    session_id: &str,
    key: &[u8],
) -> Result<Arc<RwLock<ProteusConversationSession>>>
 
pub async fn session_from_prekey( &mut self, session_id: &str, key: &[u8], ) -> Result<Arc<RwLock<ProteusConversationSession>>>
Creates a new session from a prekey
Sourcepub fn last_resort_prekey_id() -> u16
 
pub fn last_resort_prekey_id() -> u16
Returns the Proteus last resort prekey ID (u16::MAX = 65535 = 0xFFFF)
Sourcepub fn fingerprint(&self) -> String
 
pub fn fingerprint(&self) -> String
Proteus Public key hex-encoded fingerprint
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProteusCentral
impl !RefUnwindSafe for ProteusCentral
impl Send for ProteusCentral
impl Sync for ProteusCentral
impl Unpin for ProteusCentral
impl !UnwindSafe for ProteusCentral
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
§impl<T, UT> HandleAlloc<UT> for T
 
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
 
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
 
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
 
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial 
Arc<> Read moreSource§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more