pub struct SyncSender<T>(/* private fields */);Expand description
The synchronous sender endpoint for a VMO-backed FIFO queue.
Implementations§
Source§impl<T: FromBytes + IntoBytes + KnownLayout + Copy> SyncSender<T>
impl<T: FromBytes + IntoBytes + KnownLayout + Copy> SyncSender<T>
pub fn new( vmo: Vmo, alignment: usize, queue_capacity: u32, ) -> Result<Self, Status>
pub fn capacity(&self) -> u32
pub fn is_full(&self) -> bool
pub fn index(&self) -> u64
pub fn vmo(&self) -> &Vmo
pub fn shutdown(&self) -> Result<(), Status>
pub fn push(&mut self, msg: T) -> Result<u64, Status>
Sourcepub fn reserve_payload(
&mut self,
size: usize,
) -> Result<PayloadBuffer<'_, T>, Status>
pub fn reserve_payload( &mut self, size: usize, ) -> Result<PayloadBuffer<'_, T>, Status>
Reserves capacity in the payload region for a payload of size bytes.
Returns a PayloadBuffer referencing the payload region so that data can be copied or
written directly into it. The returned PayloadBuffer locks the Sender until the buffer
is either committed or dropped, preventing multiple concurrent allocations.
Auto Trait Implementations§
impl<T> Freeze for SyncSender<T>
impl<T> RefUnwindSafe for SyncSender<T>where
T: RefUnwindSafe,
impl<T> Send for SyncSender<T>where
T: Send,
impl<T> Sync for SyncSender<T>where
T: Sync,
impl<T> Unpin for SyncSender<T>where
T: Unpin,
impl<T> UnsafeUnpin for SyncSender<T>
impl<T> UnwindSafe for SyncSender<T>where
T: RefUnwindSafe + UnwindSafe,
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