pub struct CapacityPubSubSubscriber { /* private fields */ }Expand description
Subscriber-side handle to a CapacityPubSubRing. Holds its
own backing_idx + position within that backing and advances
through the chain as it catches up.
Implementations§
Source§impl CapacityPubSubSubscriber
impl CapacityPubSubSubscriber
Sourcepub fn try_next(&mut self, out: &mut [u8]) -> Result<(), PubSubReadError>
pub fn try_next(&mut self, out: &mut [u8]) -> Result<(), PubSubReadError>
Try to read the next payload. On Ok, the subscriber
advances its position by 1. On Pending at a stale
backing’s head, transparently advances to the next backing
in the chain and retries; on Pending at the active
backing’s head, returns Pending (no more data right
now).
Sourcepub fn backing_idx(&self) -> u64
pub fn backing_idx(&self) -> u64
Current backing chain index this subscriber is reading.
Auto Trait Implementations§
impl !RefUnwindSafe for CapacityPubSubSubscriber
impl !UnwindSafe for CapacityPubSubSubscriber
impl Freeze for CapacityPubSubSubscriber
impl Send for CapacityPubSubSubscriber
impl Sync for CapacityPubSubSubscriber
impl Unpin for CapacityPubSubSubscriber
impl UnsafeUnpin for CapacityPubSubSubscriber
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