Struct rings_core::channels::Channel
source · pub struct Channel<T> { /* private fields */ }Expand description
A Channel build with wasm feature or not.
- wasm features: using mpsc::UnboundedSender and mpsc::UnboundedReceiver.
- default fatures: using async_channel::Sender and async_channel::Receiver. Channel combine with async_channel::Sender and async_channel::Receiver.
Trait Implementations§
source§impl<T> Channel<T> for AcChannel<T>where
T: Debug + Send,
impl<T> Channel<T> for AcChannel<T>where T: Debug + Send,
type Sender = Sender<T>
type Receiver = Receiver<T>
fn new() -> Self
fn sender(&self) -> Self::Sender
fn receiver(&self) -> Self::Receiver
fn send<'life0, 'async_trait>( sender: &'life0 Self::Sender, msg: T ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn recv<'life0, 'async_trait>( receiver: &'life0 Self::Receiver ) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl IceTransportInterface<TransportEvent, AcChannel<TransportEvent>> for DefaultTransport
impl IceTransportInterface<TransportEvent, AcChannel<TransportEvent>> for DefaultTransport
type IceConnectionState = RTCIceConnectionState
fn new( event_sender: <AcChannel<TransportEvent> as Channel<TransportEvent>>::Sender ) -> Self
fn start<'life0, 'async_trait>( &'life0 mut self, ice_server: Vec<IceServer>, external_ip: Option<String> ) -> Pin<Box<dyn Future<Output = Result<&Self>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn apply_callback<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<&Self>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn close<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn ice_connection_state<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Option<Self::IceConnectionState>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn is_disconnected<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn is_connected<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn send_message<'life0, 'life1, 'async_trait>( &'life0 self, msg: &'life1 Bytes ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Auto Trait Implementations§
impl<T> RefUnwindSafe for AcChannel<T>
impl<T> Send for AcChannel<T>where T: Send,
impl<T> Sync for AcChannel<T>where T: Send,
impl<T> Unpin for AcChannel<T>
impl<T> UnwindSafe for AcChannel<T>
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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