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) -> CryptoResult<Self>
pub async fn try_new(keystore: &CryptoKeystore) -> CryptoResult<Self>
Initializes the ProteusCentral
sourcepub async fn session_from_prekey(
&mut self,
session_id: &str,
key: &[u8],
) -> CryptoResult<Arc<RwLock<ProteusConversationSession>>>
pub async fn session_from_prekey( &mut self, session_id: &str, key: &[u8], ) -> CryptoResult<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
sourcepub fn fingerprint_prekeybundle(prekey: &[u8]) -> CryptoResult<String>
pub fn fingerprint_prekeybundle(prekey: &[u8]) -> CryptoResult<String>
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