Enum mpc_client::Transport
source · pub enum Transport {
Relay(Client),
}
Expand description
Enumeration of available transports.
Variants§
Implementations§
Trait Implementations§
source§impl From<NativeClient> for Transport
impl From<NativeClient> for Transport
source§impl NetworkTransport for Transport
impl NetworkTransport for Transport
source§fn public_key(&self) -> &[u8] ⓘ
fn public_key(&self) -> &[u8] ⓘ
Public key for this client.
source§fn connect<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Perform initial handshake with the server.
source§fn connect_peer<'life0, 'life1, 'async_trait>(
&'life0 mut self,
public_key: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect_peer<'life0, 'life1, 'async_trait>( &'life0 mut self, public_key: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Handshake with a peer. Read more
source§fn send_json<'life0, 'life1, 'life2, 'async_trait, S>(
&'life0 mut self,
public_key: &'life1 [u8],
payload: &'life2 S,
session_id: Option<SessionId>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
S: Serialize + Send + Sync + ?Sized + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_json<'life0, 'life1, 'life2, 'async_trait, S>( &'life0 mut self, public_key: &'life1 [u8], payload: &'life2 S, session_id: Option<SessionId> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where S: Serialize + Send + Sync + ?Sized + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Send a JSON message to a peer.
source§fn send_blob<'life0, 'life1, 'async_trait>(
&'life0 mut self,
public_key: &'life1 [u8],
payload: Vec<u8>,
session_id: Option<SessionId>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_blob<'life0, 'life1, 'async_trait>( &'life0 mut self, public_key: &'life1 [u8], payload: Vec<u8>, session_id: Option<SessionId> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Send a binary message to a peer.
source§fn new_session<'life0, 'async_trait>(
&'life0 mut self,
participant_keys: Vec<Vec<u8>>,
session_id: Option<SessionId>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_session<'life0, 'async_trait>( &'life0 mut self, participant_keys: Vec<Vec<u8>>, session_id: Option<SessionId> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create a new session. Read more
source§fn register_connection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
session_id: &'life1 SessionId,
peer_key: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_connection<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 SessionId, peer_key: &'life2 [u8] ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Register a peer connection in a session.
source§fn close_session<'life0, 'async_trait>(
&'life0 mut self,
session_id: SessionId
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_session<'life0, 'async_trait>( &'life0 mut self, session_id: SessionId ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Close a session.
source§fn broadcast_json<'life0, 'life1, 'life2, 'life3, 'async_trait, S>(
&'life0 mut self,
session_id: &'life1 SessionId,
recipient_public_keys: &'life2 [Vec<u8>],
payload: &'life3 S
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
S: Serialize + Send + Sync + ?Sized + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn broadcast_json<'life0, 'life1, 'life2, 'life3, 'async_trait, S>( &'life0 mut self, session_id: &'life1 SessionId, recipient_public_keys: &'life2 [Vec<u8>], payload: &'life3 S ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where S: Serialize + Send + Sync + ?Sized + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Broadcast a JSON message in the context of a session.
source§fn broadcast_blob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
session_id: &'life1 SessionId,
recipient_public_keys: &'life2 [Vec<u8>],
payload: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn broadcast_blob<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 SessionId, recipient_public_keys: &'life2 [Vec<u8>], payload: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Broadcast a binary message in the context of a session.
Auto Trait Implementations§
impl !RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl !UnwindSafe for Transport
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