pub struct Receiver<T> { /* private fields */ }Expand description
A receiver endpoint for a VMO-backed FIFO queue.
Implementations§
Source§impl<T: FromBytes + IntoBytes + KnownLayout + Copy> Receiver<T>
impl<T: FromBytes + IntoBytes + KnownLayout + Copy> Receiver<T>
pub fn new(vmo: Vmo, capacity: u32) -> Result<Self, Status>
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> u32
pub fn index(&self) -> u64
pub fn vmo(&self) -> &Vmo
Sourcepub fn pop_reserve(&mut self) -> Result<T, Status>
pub fn pop_reserve(&mut self) -> Result<T, Status>
Fetches the next message without incrementing the read index.
Sourcepub fn pop_commit(&mut self) -> Result<(), Status>
pub fn pop_commit(&mut self) -> Result<(), Status>
Commit the read, freeing the slot.
Sourcepub fn payload_slice(&self, vmo_offset: u32, len: u32) -> PtrByteSlice<'_>
pub fn payload_slice(&self, vmo_offset: u32, len: u32) -> PtrByteSlice<'_>
Returns a raw slice pointer to the specified payload region.
§Panics
Panics if the vmo_offset + len exceeds the bounds of the VMO.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Receiver<T>
impl<T> RefUnwindSafe for Receiver<T>where
T: RefUnwindSafe,
impl<T> Send for Receiver<T>where
T: Send,
impl<T> Sync for Receiver<T>where
T: Sync,
impl<T> Unpin for Receiver<T>where
T: Unpin,
impl<T> UnsafeUnpin for Receiver<T>
impl<T> UnwindSafe for Receiver<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