pub enum EofPolicy {
Drop,
Deliver,
Fail,
}Expand description
What a reader does with an event cut off by end of stream.
Variants§
Drop
Drop it, per the EventSource spec (the default).
Deliver
Deliver a complete final frame that lacks its blank line (SseDecoder::finish).
Fail
Report an error when the stream ends inside an event (SseDecoder::has_pending),
so a truncated stream fails closed.
Trait Implementations§
impl Copy for EofPolicy
impl Eq for EofPolicy
impl StructuralPartialEq for EofPolicy
Auto Trait Implementations§
impl Freeze for EofPolicy
impl RefUnwindSafe for EofPolicy
impl Send for EofPolicy
impl Sync for EofPolicy
impl Unpin for EofPolicy
impl UnsafeUnpin for EofPolicy
impl UnwindSafe for EofPolicy
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