pub struct Tx<T, const N: usize = 16> { /* private fields */ }Expand description
Sender handle: “I send”. The holder of a Tx<T> sends items of type T.
In method args, the handler holds it (handler sends → caller).
Wire encoding is always unit (()), with channel IDs carried exclusively
in Message::Request.channels.
Implementations§
Source§impl<T, const N: usize> Tx<T, N>
impl<T, const N: usize> Tx<T, N>
pub fn is_bound(&self) -> bool
Sourcepub fn has_core(&self) -> bool
pub fn has_core(&self) -> bool
Check if this Tx is part of a channel() pair (has a shared core).
pub async fn send<'value>(&self, value: T) -> Result<(), TxError>where
T: Facet<'value>,
pub async fn close<'value>( &self, metadata: Metadata<'value>, ) -> Result<(), TxError>
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize = 16> !Freeze for Tx<T, N>
impl<T, const N: usize = 16> !RefUnwindSafe for Tx<T, N>
impl<T, const N: usize> Send for Tx<T, N>where
T: Send,
impl<T, const N: usize> Sync for Tx<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for Tx<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for Tx<T, N>
impl<T, const N: usize = 16> !UnwindSafe for Tx<T, N>
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