Struct fire_http_api::stream::streamer::Streamer
source · pub struct Streamer<M> { /* private fields */ }Available on crate feature
feature only.Implementations§
source§impl<M> Streamer<M>
impl<M> Streamer<M>
sourcepub async fn send(&mut self, data: M) -> Result<(), StreamError>where
M: Serialize,
pub async fn send(&mut self, data: M) -> Result<(), StreamError>where
M: Serialize,
§Panics
If you call this when the Stream::KIND is not Receiver
sourcepub async fn closed(&self)
pub async fn closed(&self)
Completes when the receiver has dropped.
§Panics
If you call this when the Stream::KIND is not Receiver
sourcepub async fn recv(&mut self) -> Result<M, StreamError>where
M: DeserializeOwned,
pub async fn recv(&mut self) -> Result<M, StreamError>where
M: DeserializeOwned,
§Panics
If you call this when the Stream::KIND is not Sender
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Streamer<M>
impl<M> Send for Streamer<M>where
M: Send,
impl<M> Sync for Streamer<M>where
M: Sync,
impl<M> Unpin for Streamer<M>where
M: Unpin,
impl<M> !UnwindSafe for Streamer<M>
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