pub struct BoxedObserver<'or, T, E>(/* private fields */);Expand description
Type-erased observer for multi-threaded builds to handle this problem https://stackoverflow.com/q/46620790/9315497
Implementations§
Source§impl<'or, T, E> BoxedObserver<'or, T, E>
impl<'or, T, E> BoxedObserver<'or, T, E>
pub fn new(observer: impl Observer<T, E> + NecessarySendSync + 'or) -> Self
Trait Implementations§
Source§impl<T, E> Debug for BoxedObserver<'_, T, E>
impl<T, E> Debug for BoxedObserver<'_, T, E>
Source§impl<T, E> Observer<T, E> for BoxedObserver<'_, T, E>
impl<T, E> Observer<T, E> for BoxedObserver<'_, T, E>
Source§fn on_termination(self, termination: Termination<E>)
fn on_termination(self, termination: Termination<E>)
Called when the operation has reached its termination state.
Auto Trait Implementations§
impl<'or, T, E> Freeze for BoxedObserver<'or, T, E>
impl<'or, T, E> !RefUnwindSafe for BoxedObserver<'or, T, E>
impl<'or, T, E> Send for BoxedObserver<'or, T, E>
impl<'or, T, E> Sync for BoxedObserver<'or, T, E>
impl<'or, T, E> Unpin for BoxedObserver<'or, T, E>
impl<'or, T, E> !UnwindSafe for BoxedObserver<'or, T, E>
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