Struct rings_node::prelude::Transport
source · pub struct Transport {
pub id: Uuid,
/* private fields */
}Expand description
DefaultTransport use for node.
Fields§
§id: Uuidan unique identity
Implementations§
source§impl DefaultTransport
impl DefaultTransport
pub async fn ice_gathering_state(
&self
) -> impl Future<Output = Option<RTCIceGatheringState>>
pub async fn setup_channel(
&mut self,
name: &str
) -> impl Future<Output = Result<(), Error>>
pub async fn wait_for_data_channel_open(
&self
) -> impl Future<Output = Result<(), Error>>
pub async fn connect_success_promise(
&self
) -> impl Future<Output = Result<Promise, Error>>
Trait Implementations§
source§impl Clone for DefaultTransport
impl Clone for DefaultTransport
source§fn clone(&self) -> DefaultTransport
fn clone(&self) -> DefaultTransport
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 Drop for DefaultTransport
impl Drop for DefaultTransport
source§impl IceCandidateGathering for DefaultTransport
impl IceCandidateGathering for DefaultTransport
fn add_ice_candidate<'life0, 'async_trait>(
&'life0 self,
candidate: IceCandidate
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn set_local_description<'life0, 'async_trait, T>(
&'life0 self,
desc: T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: Into<RTCSessionDescription> + Send + 'async_trait,
DefaultTransport: 'async_trait,
fn set_remote_description<'life0, 'async_trait, T>(
&'life0 self,
desc: T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: Into<RTCSessionDescription> + Send + 'async_trait,
DefaultTransport: 'async_trait,
source§impl IceTransport for DefaultTransport
impl IceTransport for DefaultTransport
source§fn get_offer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RTCSessionDescription, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn get_offer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RTCSessionDescription, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
get a RTCConnection offer, use to connect other nodes.
source§fn get_answer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RTCSessionDescription, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn get_answer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RTCSessionDescription, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
get a RTCConnection answer, relay offer message and make connection.
type Connection = RTCPeerConnection
type Candidate = RTCIceCandidate
type Sdp = RTCSessionDescription
type DataChannel = RTCDataChannel
fn get_peer_connection<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Arc<RTCPeerConnection>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn get_pending_candidates<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<RTCIceCandidate, Global>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn get_data_channel<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Arc<RTCDataChannel>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
source§impl IceTransportCallback for DefaultTransport
impl IceTransportCallback for DefaultTransport
type OnLocalCandidateHdlrFn = Box<dyn FnMut(Option<RTCIceCandidate>) -> Pin<Box<dyn Future<Output = ()> + Send + 'static, Global>> + Sync + Send + 'static, Global>
type OnDataChannelHdlrFn = Box<dyn FnMut(Arc<RTCDataChannel>) -> Pin<Box<dyn Future<Output = ()> + Send + 'static, Global>> + Sync + Send + 'static, Global>
type OnIceConnectionStateChangeHdlrFn = Box<dyn FnMut(RTCIceConnectionState) -> Pin<Box<dyn Future<Output = ()> + Send + 'static, Global>> + Sync + Send + 'static, Global>
fn on_ice_connection_state_change<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = <DefaultTransport as IceTransportCallback>::OnIceConnectionStateChangeHdlrFn> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn on_ice_candidate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = <DefaultTransport as IceTransportCallback>::OnLocalCandidateHdlrFn> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn on_data_channel<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = <DefaultTransport as IceTransportCallback>::OnDataChannelHdlrFn> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
source§impl IceTransportInterface<Event, AcChannel<Event>> for DefaultTransport
impl IceTransportInterface<Event, AcChannel<Event>> for DefaultTransport
type IceConnectionState = RTCIceConnectionState
fn new(
event_sender: <AcChannel<Event> as Channel<Event>>::Sender
) -> DefaultTransport
fn start<'life0, 'async_trait>(
&'life0 mut self,
ice_server: Vec<IceServer, Global>,
external_ip: Option<String>
) -> Pin<Box<dyn Future<Output = Result<&'life0 DefaultTransport, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn apply_callback<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<&'life0 DefaultTransport, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn ice_connection_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<<DefaultTransport as IceTransportInterface<Event, AcChannel<Event>>>::IceConnectionState>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn is_disconnected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn is_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn pubkey<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: '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,
DefaultTransport: 'async_trait,
source§impl IceTrickleScheme for DefaultTransport
impl IceTrickleScheme for DefaultTransport
type SdpType = RTCSdpType
fn get_handshake_info<'life0, 'life1, 'async_trait>(
&'life0 self,
session_manager: &'life1 SessionManager,
kind: RTCSdpType
) -> Pin<Box<dyn Future<Output = Result<Encoded, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
DefaultTransport: 'async_trait,
fn register_remote_info<'life0, 'async_trait>(
&'life0 self,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<Did, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
fn wait_for_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
DefaultTransport: 'async_trait,
source§impl PartialEq<DefaultTransport> for DefaultTransport
impl PartialEq<DefaultTransport> for DefaultTransport
source§fn eq(&self, other: &DefaultTransport) -> bool
fn eq(&self, other: &DefaultTransport) -> bool
This method tests for
self and other values to be equal, and is used
by ==.