Enum overclock::core::Subscriber
source · [−]pub enum Subscriber<T: Resource> {
OneCopy(Sender<Result<T>>),
LinkedCopy(Option<Sender<Result<T>>>, Box<dyn Shutdown>, bool),
DynCopy(ResourceRef, Box<dyn Route<Event<T>>>),
}
Expand description
Subscriber variants
Variants
OneCopy(Sender<Result<T>>)
OneCopy subscriber will receive one copy of the resource once it’s available
LinkedCopy(Option<Sender<Result<T>>>, Box<dyn Shutdown>, bool)
LinkedOneCopy subscriber will receive one copy of the resource once it’s available, subscriber will get shutdown if the resource is replaced or dropped.
DynCopy(ResourceRef, Box<dyn Route<Event<T>>>)
Subscriber will receive dynamic copies, pushed by the publisher, and Event::Dropped(..) will be pushed if the resource got dropped by the publisher. Bool flag is used to indicate wheith
Implementations
sourceimpl<T: Resource> Subscriber<T>
impl<T: Resource> Subscriber<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for Subscriber<T>
impl<T> Send for Subscriber<T>
impl<T> Sync for Subscriber<T>
impl<T> Unpin for Subscriber<T>
impl<T> !UnwindSafe for Subscriber<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more