[−][src]Struct syscall::io_uring::v1::SpscReceiver
A safe wrapper over the raw Ring
interface, that takes care of the mmap offset, as well
as the global Ring
structure. Only allows receiving items.
The wrapper is Send
, and can thus be transferred between threads. However, it is
[!Sync]
, since it does not take multiple atomic receivers into account. Thus, it will
have to be wrapped in something like a mutex if that is necessary.
Implementations
impl<T> SpscReceiver<T>
[src]
pub unsafe fn from_raw(ring: *const Ring<T>, entries_base: *const T) -> Self
[src]
pub fn try_recv(&self) -> Result<T, RingPopError>
[src]
pub fn spin_on_recv(&self) -> Result<T, RingRecvError>
[src]
pub fn try_iter(&self) -> impl Iterator<Item = T> + '_
[src]
pub fn deallocate(self) -> Result<()>
[src]
pub unsafe fn ring_header(&self) -> &Ring<T>
[src]
Retrieve the ring header, which stores head and tail pointers, and epochs.
Safety
Unsafe for the same reasons as with SpscSender
.
Trait Implementations
impl<T> Drop for SpscReceiver<T>
[src]
impl<T: Send> Send for SpscReceiver<T>
[src]
Auto Trait Implementations
impl<T> !Sync for SpscReceiver<T>
impl<T> Unpin for SpscReceiver<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,