Struct eventsource_stream::EventStream
source · [−]pub struct EventStream<S> { /* private fields */ }
Expand description
A Stream of events
Implementations
sourceimpl<S> EventStream<S>
impl<S> EventStream<S>
sourcepub fn set_last_event_id(&mut self, id: impl Into<String>)
pub fn set_last_event_id(&mut self, id: impl Into<String>)
Set the last event ID of the stream. Useful for initializing the stream with a previous last event ID
sourcepub fn last_event_id(&self) -> &str
pub fn last_event_id(&self) -> &str
Get the last event ID of the stream
Trait Implementations
sourceimpl<S, B, E> Stream for EventStream<S> where
S: Stream<Item = Result<B, E>>,
B: AsRef<[u8]>,
impl<S, B, E> Stream for EventStream<S> where
S: Stream<Item = Result<B, E>>,
B: AsRef<[u8]>,
type Item = Result<Event, EventStreamError<E>>
type Item = Result<Event, EventStreamError<E>>
Values yielded by the stream.
impl<'__pin, S> Unpin for EventStream<S> where
__Origin<'__pin, S>: Unpin,
Auto Trait Implementations
impl<S> RefUnwindSafe for EventStream<S> where
S: RefUnwindSafe,
impl<S> Send for EventStream<S> where
S: Send,
impl<S> Sync for EventStream<S> where
S: Sync,
impl<S> UnwindSafe for EventStream<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more