pub struct TeeHelper<T, C> { /* private fields */ }Expand description
The subscribe half of a shared destination for pushing at.
Cloning a TeeHelper will upgrade it, teaching the shared list how to clone containers.
Implementations§
Source§impl<T: 'static, C: 'static> TeeHelper<T, C>
impl<T: 'static, C: 'static> TeeHelper<T, C>
Sourcepub fn upgrade(&self)
pub fn upgrade(&self)
Upgrades the shared list to one that supports cloning.
This method “teaches” the Tee how to clone containers, which enables adding multiple pushers.
It introduces the cost of one additional virtual call through a boxed trait, so one should not
upgrade for no reason.
Sourcepub fn add_pusher<P: Push<Message<T, C>> + 'static>(self, pusher: P)
pub fn add_pusher<P: Push<Message<T, C>> + 'static>(self, pusher: P)
Adds a new Push implementor to the list of recipients shared with a Stream.
Trait Implementations§
Auto Trait Implementations§
impl<T, C> Freeze for TeeHelper<T, C>
impl<T, C> !RefUnwindSafe for TeeHelper<T, C>
impl<T, C> !Send for TeeHelper<T, C>
impl<T, C> !Sync for TeeHelper<T, C>
impl<T, C> Unpin for TeeHelper<T, C>
impl<T, C> !UnwindSafe for TeeHelper<T, C>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more