pub struct ChangeDetector { /* private fields */ }Expand description
Detects content changes in a sequence of frames, such as a frame stream. Feeds the settle signal: frames keep arriving while nothing changes.
Implementations§
Source§impl ChangeDetector
impl ChangeDetector
pub fn new(hasher: FrameHasher) -> Self
Sourcepub fn observe(&mut self, frame: &Frame) -> Observation
pub fn observe(&mut self, frame: &Frame) -> Observation
Classifies frame against the previous frame and remembers it.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Forgets the previous frame, so the next one is Observation::First.
Trait Implementations§
Source§impl Clone for ChangeDetector
impl Clone for ChangeDetector
Auto Trait Implementations§
impl Freeze for ChangeDetector
impl RefUnwindSafe for ChangeDetector
impl Send for ChangeDetector
impl Sync for ChangeDetector
impl Unpin for ChangeDetector
impl UnsafeUnpin for ChangeDetector
impl UnwindSafe for ChangeDetector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request