pub struct Single<T: Sync + Send + Clone> { /* private fields */ }
Expand description
A subject that only emits a single value
After a value is emmitted once, all future calls to next() will be ignored, and any future subscriptions will be called with the original value once.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Single<T>
impl<T> RefUnwindSafe for Single<T>
impl<T> Send for Single<T>
impl<T> Sync for Single<T>
impl<T> Unpin for Single<T>where
T: Unpin,
impl<T> UnwindSafe for Single<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