pub struct ChannelEndpoint<T, U> {
pub send: UnboundedSender<T>,
pub recv: UnboundedReceiver<U>,
}
Expand description
A sender and a receiver bundled together for two-way communication
Fields§
§send: UnboundedSender<T>
The sender
recv: UnboundedReceiver<U>
The receiver
Implementations§
Source§impl<T, U> ChannelEndpoint<T, U>
impl<T, U> ChannelEndpoint<T, U>
Sourcepub const fn new(send: UnboundedSender<T>, recv: UnboundedReceiver<U>) -> Self
pub const fn new(send: UnboundedSender<T>, recv: UnboundedReceiver<U>) -> Self
create a new endpoint from a sender and a receiver
Trait Implementations§
Source§impl<T, U> AsMut<UnboundedReceiver<U>> for ChannelEndpoint<T, U>
impl<T, U> AsMut<UnboundedReceiver<U>> for ChannelEndpoint<T, U>
Source§fn as_mut(&mut self) -> &mut UnboundedReceiver<U>
fn as_mut(&mut self) -> &mut UnboundedReceiver<U>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<T, U> AsMut<UnboundedSender<T>> for ChannelEndpoint<T, U>
impl<T, U> AsMut<UnboundedSender<T>> for ChannelEndpoint<T, U>
Source§fn as_mut(&mut self) -> &mut UnboundedSender<T>
fn as_mut(&mut self) -> &mut UnboundedSender<T>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<T, U> AsRef<UnboundedReceiver<U>> for ChannelEndpoint<T, U>
impl<T, U> AsRef<UnboundedReceiver<U>> for ChannelEndpoint<T, U>
Source§fn as_ref(&self) -> &UnboundedReceiver<U>
fn as_ref(&self) -> &UnboundedReceiver<U>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<T, U> AsRef<UnboundedSender<T>> for ChannelEndpoint<T, U>
impl<T, U> AsRef<UnboundedSender<T>> for ChannelEndpoint<T, U>
Source§fn as_ref(&self) -> &UnboundedSender<T>
fn as_ref(&self) -> &UnboundedSender<T>
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl<T, U> Freeze for ChannelEndpoint<T, U>
impl<T, U> RefUnwindSafe for ChannelEndpoint<T, U>
impl<T, U> Send for ChannelEndpoint<T, U>
impl<T, U> Sync for ChannelEndpoint<T, U>
impl<T, U> Unpin for ChannelEndpoint<T, U>
impl<T, U> UnwindSafe for ChannelEndpoint<T, U>
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