pub struct ObserverBase<T> { /* private fields */ }Expand description
An observer that enforces the grammar of the notifications on its core (ObserverBase<T>):
values reach the core until a terminal notification; the first terminal notification reaches
it, and every notification after it is ignored. Disposing the observer stops it the same way.
Implementations§
Source§impl<T: 'static> ObserverBase<T>
impl<T: 'static> ObserverBase<T>
Sourcepub fn new(core: impl ObserverCore<T> + 'static) -> Self
pub fn new(core: impl ObserverCore<T> + 'static) -> Self
An observer of the handlers of core (a subclass of ObserverBase<T> upstream).
Trait Implementations§
Source§impl<T> IDisposable for ObserverBase<T>
impl<T> IDisposable for ObserverBase<T>
Source§impl<T: 'static> IObserver<T> for ObserverBase<T>
impl<T: 'static> IObserver<T> for ObserverBase<T>
Source§fn on_next(&self, value: T)
fn on_next(&self, value: T)
Hands the value to the core unless the observer is stopped (OnNext).
Source§fn on_error(&self, error: ObservableError)
fn on_error(&self, error: ObservableError)
Stops the observer and hands the error to the core, the first time (OnError).
Source§fn on_completed(&self)
fn on_completed(&self)
Stops the observer and tells the core, the first time (OnCompleted).
Auto Trait Implementations§
impl<T> !Freeze for ObserverBase<T>
impl<T> !RefUnwindSafe for ObserverBase<T>
impl<T> !Send for ObserverBase<T>
impl<T> !Sync for ObserverBase<T>
impl<T> !UnwindSafe for ObserverBase<T>
impl<T> Unpin for ObserverBase<T>
impl<T> UnsafeUnpin for ObserverBase<T>
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