pub struct HybridChannel<T>(/* private fields */);Expand description
Zero-sized factory for a zero-copy hybrid channel endpoint pair.
The sender and receiver own the shared ring and wake registries. The factory carries only its scalar parameter, so constructing endpoints never creates an unused channel-owner allocation or duplicate synchronization state.
Implementations§
Source§impl<T> HybridChannel<T>where
T: Send,
impl<T> HybridChannel<T>where
T: Send,
Sourcepub fn new(capacity: usize) -> (HybridSender<T>, HybridReceiver<T>)
pub fn new(capacity: usize) -> (HybridSender<T>, HybridReceiver<T>)
Create a new hybrid channel with specified capacity
Auto Trait Implementations§
impl<T> Freeze for HybridChannel<T>
impl<T> RefUnwindSafe for HybridChannel<T>
impl<T> Send for HybridChannel<T>
impl<T> Sync for HybridChannel<T>
impl<T> Unpin for HybridChannel<T>
impl<T> UnsafeUnpin for HybridChannel<T>
impl<T> UnwindSafe for HybridChannel<T>
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