Trait rings_node::prelude::IceTransportInterface
source · pub trait IceTransportInterface<E, Ch>where
E: Send,
Ch: Channel<E>,{
type IceConnectionState;
fn new(event_sender: <Ch as Channel<E>>::Sender) -> Self;
fn start<'life0, 'async_trait>(
&'life0 mut self,
addr: Vec<IceServer, Global>,
external_id: Option<String>
) -> Pin<Box<dyn Future<Output = Result<&'life0 Self, Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn apply_callback<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<&'life0 Self, Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn ice_connection_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Self::IceConnectionState>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn is_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn is_disconnected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn pubkey<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 Bytes
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
A custom IceTransportInterface used in ring-core.