Struct reactive_mutiny::ogre_std::ogre_queues::log_topics::mmap_meta::MMapMetaFixedSubscriber
source · pub struct MMapMetaFixedSubscriber<'a, SlotType: 'a> { /* private fields */ }Expand description
A subscriber that follows a “fixed” tail – used on followers of “old” events, as opposed to MMapMetaDynamicSubscriber, which may yield “new” events as well
Trait Implementations§
source§impl<'a, SlotType: 'a + Debug> MetaSubscriber<'a, SlotType> for MMapMetaFixedSubscriber<'a, SlotType>
impl<'a, SlotType: 'a + Debug> MetaSubscriber<'a, SlotType> for MMapMetaFixedSubscriber<'a, SlotType>
source§fn consume<GetterReturnType: 'a, GetterFn: FnOnce(&'a SlotType) -> GetterReturnType, ReportEmptyFn: Fn() -> bool, ReportLenAfterDequeueingFn: FnOnce(i32)>(
&self,
getter_fn: GetterFn,
report_empty_fn: ReportEmptyFn,
report_len_after_dequeueing_fn: ReportLenAfterDequeueingFn,
) -> Option<GetterReturnType>
fn consume<GetterReturnType: 'a, GetterFn: FnOnce(&'a SlotType) -> GetterReturnType, ReportEmptyFn: Fn() -> bool, ReportLenAfterDequeueingFn: FnOnce(i32)>( &self, getter_fn: GetterFn, report_empty_fn: ReportEmptyFn, report_len_after_dequeueing_fn: ReportLenAfterDequeueingFn, ) -> Option<GetterReturnType>
Zero-copy dequeue method with the following characteristics: Read more
source§fn consume_leaking(&'a self) -> Option<(&'a SlotType, u32)>
fn consume_leaking(&'a self) -> Option<(&'a SlotType, u32)>
Advanced method to “consume” the next element from the pool, returning a reference to the data.
The slot in which the data sits won’t be put back into the pool (for reuse) until [release_leaked()] is called.
Please notice that misuse of this method may bring the underlying container into an unusable state, as it may run out of slots for new elements to be published in.
IMPLEMENTORS: #[inline(always)]
The slot in which the data sits won’t be put back into the pool (for reuse) until [release_leaked()] is called.
Please notice that misuse of this method may bring the underlying container into an unusable state, as it may run out of slots for new elements to be published in.
IMPLEMENTORS: #[inline(always)]
source§fn release_leaked_ref(&'a self, _slot: &'a SlotType)
fn release_leaked_ref(&'a self, _slot: &'a SlotType)
Put the
See the mentioned method for more info. IMPLEMENTORS: #[inline(always)]
slot returned by [consume_leaking()] back into the pool, so it may be reused.See the mentioned method for more info. IMPLEMENTORS: #[inline(always)]
source§fn release_leaked_id(&'a self, _slot_id: u32)
fn release_leaked_id(&'a self, _slot_id: u32)
The same as [release_leaked_ref()], but slightly more efficient
IMPLEMENTORS: #[inline(always)]
source§fn remaining_elements_count(&self) -> usize
fn remaining_elements_count(&self) -> usize
Returns the same information as [MetaPublisher::available_elements_count()] for implementors that doesn’t allow several subscribers;
For those that allow it (that is, use the “Listener Pattern”), returns how much elements are left for consumption
IMPLEMENTORS: #[inline(always)]
Auto Trait Implementations§
impl<'a, SlotType> !Freeze for MMapMetaFixedSubscriber<'a, SlotType>
impl<'a, SlotType> RefUnwindSafe for MMapMetaFixedSubscriber<'a, SlotType>where
SlotType: RefUnwindSafe,
impl<'a, SlotType> Send for MMapMetaFixedSubscriber<'a, SlotType>where
SlotType: Send,
impl<'a, SlotType> Sync for MMapMetaFixedSubscriber<'a, SlotType>where
SlotType: Sync,
impl<'a, SlotType> Unpin for MMapMetaFixedSubscriber<'a, SlotType>
impl<'a, SlotType> !UnwindSafe for MMapMetaFixedSubscriber<'a, SlotType>
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