pub enum Error<E> {
Timeout,
SourceError(E),
}Variants§
Trait Implementations§
Source§impl<'or, 'sub, T, E, OE, S> Observable<'static, 'sub, T, Error<E>> for Timeout<OE, S>where
OE: Observable<'or, 'static, T, E>,
S: Scheduler,
impl<'or, 'sub, T, E, OE, S> Observable<'static, 'sub, T, Error<E>> for Timeout<OE, S>where
OE: Observable<'or, 'static, T, E>,
S: Scheduler,
Source§fn subscribe(
self,
observer: impl Observer<T, Error<E>> + NecessarySend + 'static,
) -> Subscription<'static>
fn subscribe( self, observer: impl Observer<T, Error<E>> + NecessarySend + 'static, ) -> Subscription<'static>
Subscribes an observer to this observable. When an observer is subscribed, it will start receiving events from the observable.
The
subscribe method returns a Subscription which can be used to unsubscribe the observer from the observable.
We use Subscription struct instead of trait like impl Cancellable, because we need to cancel the subscription when the Subscription is dropped. It’s not possible to implement Drop for a trait object.impl<E> Eq for Error<E>where
E: PartialEq,
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
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