struct Inner {
sequence: Arc<Sequence>,
bounds: ReplayBounds,
ring: Mutex<Ring>,
published: Sender<u64>,
held: Option<Arc<Held>>,
closing: Sender<bool>,
}Fields§
§sequence: Arc<Sequence>§bounds: ReplayBounds§ring: Mutex<Ring>The replay buffer, and the lock that makes the stream ordered.
The sequence number is assigned and the frame buffered while this is held, so two concurrent writes cannot reach the buffer in the opposite order to their numbers. Out of order, a consumer would be handed a frame it had already applied and skip one it had not.
published: Sender<u64>The newest sequence number buffered, which every stream waits on for its next frame. One receiver per stream.
held: Option<Arc<Held>>Commits waiting for the log to sync past them, for a producer over a log. See the module docs.
closing: Sender<bool>Set once, when every stream ends after what it holds. See
Repos::close.
Implementations§
Source§impl Inner
impl Inner
Sourcefn ring(&self) -> MutexGuard<'_, Ring>
fn ring(&self) -> MutexGuard<'_, Ring>
Takes the ring lock, recovering from poisoning.
Every operation under it is a push and a pop on a deque, so a panic elsewhere cannot have left it half-updated, and refusing to serve the stream over an unrelated panic would be a worse outcome than serving it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Inner
impl !RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl UnsafeUnpin for Inner
impl !UnwindSafe for Inner
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more