pub struct StreamController { /* private fields */ }Expand description
Tracks append streams and computes minimal synchronization deltas.
Implementations§
Source§impl StreamController
impl StreamController
Sourcepub fn new(max_tracked: usize, expiry_secs: u64) -> Self
pub fn new(max_tracked: usize, expiry_secs: u64) -> Self
Creates a controller with bounded tracking and expiry in seconds.
Sourcepub fn compute_delta(
&mut self,
stream_ref: &StreamRef,
current_content: &[String],
) -> StreamDelta
pub fn compute_delta( &mut self, stream_ref: &StreamRef, current_content: &[String], ) -> StreamDelta
Compares current content with tracked state and returns its minimal delta.
Sourcepub fn tracked_count(&self) -> usize
pub fn tracked_count(&self) -> usize
Returns the number of actively tracked streams.
Auto Trait Implementations§
impl Freeze for StreamController
impl RefUnwindSafe for StreamController
impl Send for StreamController
impl Sync for StreamController
impl Unpin for StreamController
impl UnsafeUnpin for StreamController
impl UnwindSafe for StreamController
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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