pub struct SessionState {
pub session_id: SessionId,
pub all_participants: Vec<Vec<u8>>,
}
Expand description
Response from creating new session.
Fields§
§session_id: SessionId
Session identifier.
all_participants: Vec<Vec<u8>>
Public keys of all participants.
Implementations§
Source§impl SessionState
impl SessionState
Sourcepub fn party_number(&self, public_key: impl AsRef<[u8]>) -> Option<PartyNumber>
pub fn party_number(&self, public_key: impl AsRef<[u8]>) -> Option<PartyNumber>
Get the party index from a public key.
Sourcepub fn peer_key(&self, party_number: PartyNumber) -> Option<&[u8]>
pub fn peer_key(&self, party_number: PartyNumber) -> Option<&[u8]>
Get the public key for a party number.
Sourcepub fn connections(&self, own_key: &[u8]) -> &[Vec<u8>]
pub fn connections(&self, own_key: &[u8]) -> &[Vec<u8>]
Get the connections a peer should make.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SessionState
impl Debug for SessionState
Source§impl Decodable for SessionState
impl Decodable for SessionState
Source§impl Default for SessionState
impl Default for SessionState
Source§fn default() -> SessionState
fn default() -> SessionState
Returns the “default value” for a type. Read more
Source§impl Encodable for SessionState
impl Encodable for SessionState
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Encode self into the binary writer.
Auto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnwindSafe for SessionState
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