pub struct ShmSequencedSlotsSubscriber { /* private fields */ }Expand description
Subscriber/consumer that reads from the cursor and advances a specific gating sequence.
This is the multi-consumer (multicast) building block.
Implementations§
Source§impl ShmSequencedSlotsSubscriber
impl ShmSequencedSlotsSubscriber
Sourcepub fn attach(
opts: &AttachOptions,
lane: &str,
consumer: usize,
) -> Result<Self, BackingError>
pub fn attach( opts: &AttachOptions, lane: &str, consumer: usize, ) -> Result<Self, BackingError>
Attach a subscriber for consumer.
Sourcepub fn recv_next_into<W: WaitStrategy>(
&mut self,
cursor: &CursorBarrier,
wait: &mut W,
out: &mut [u8],
) -> Result<(u64, usize), SequencedSlotsError>
pub fn recv_next_into<W: WaitStrategy>( &mut self, cursor: &CursorBarrier, wait: &mut W, out: &mut [u8], ) -> Result<(u64, usize), SequencedSlotsError>
Receive the next sequenced entry into out, advancing gating and releasing the slot.
Sourcepub fn recv_next_into_from<W: WaitStrategy, B: SeqBarrier>(
&mut self,
barrier: &B,
wait: &mut W,
out: &mut [u8],
) -> Result<(u64, usize), SequencedSlotsError>
pub fn recv_next_into_from<W: WaitStrategy, B: SeqBarrier>( &mut self, barrier: &B, wait: &mut W, out: &mut [u8], ) -> Result<(u64, usize), SequencedSlotsError>
Receive the next sequenced entry into out, waiting on an arbitrary SeqBarrier.
This is the building block for stage-ordered consumption (e.g. consumer waits on the last stage’s gating sequence, or on a join barrier).
Sourcepub fn recv_next_into_stoppable<W: WaitStrategy>(
&mut self,
cursor: &CursorBarrier,
wait: &mut W,
out: &mut [u8],
stop: &AtomicBool,
) -> Result<(u64, usize), SequencedSlotsError>
pub fn recv_next_into_stoppable<W: WaitStrategy>( &mut self, cursor: &CursorBarrier, wait: &mut W, out: &mut [u8], stop: &AtomicBool, ) -> Result<(u64, usize), SequencedSlotsError>
Stop-aware variant of Self::recv_next_into.
Sourcepub fn recv_next_into_from_stoppable<W: WaitStrategy, B: SeqBarrier>(
&mut self,
barrier: &B,
wait: &mut W,
out: &mut [u8],
stop: &AtomicBool,
) -> Result<(u64, usize), SequencedSlotsError>
pub fn recv_next_into_from_stoppable<W: WaitStrategy, B: SeqBarrier>( &mut self, barrier: &B, wait: &mut W, out: &mut [u8], stop: &AtomicBool, ) -> Result<(u64, usize), SequencedSlotsError>
Stop-aware variant of Self::recv_next_into_from.
Auto Trait Implementations§
impl Freeze for ShmSequencedSlotsSubscriber
impl !RefUnwindSafe for ShmSequencedSlotsSubscriber
impl Send for ShmSequencedSlotsSubscriber
impl Sync for ShmSequencedSlotsSubscriber
impl Unpin for ShmSequencedSlotsSubscriber
impl !UnwindSafe for ShmSequencedSlotsSubscriber
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