pub struct StreamEmitter<T> { /* private fields */ }Expand description
An intermediary that transfers values from stream to its consumer
Implementations§
Source§impl<T> StreamEmitter<T>
impl<T> StreamEmitter<T>
Sourcepub fn emit(&self, value: T) -> EmitFuture<'_, T> ⓘ
pub fn emit(&self, value: T) -> EmitFuture<'_, T> ⓘ
Emit value from a stream and wait until stream consumer calls futures_util::StreamExt::next again.
§Panics
Will panic if:
emitis called not in context of polling the stream
Trait Implementations§
impl<T: RefUnwindSafe> RefUnwindSafe for StreamEmitter<T>
impl<T: Send> Send for StreamEmitter<T>
impl<T: Send> Sync for StreamEmitter<T>
impl<T: UnwindSafe> UnwindSafe for StreamEmitter<T>
Auto Trait Implementations§
impl<T> Freeze for StreamEmitter<T>
impl<T> Unpin for StreamEmitter<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