pub enum FrameError {
BlockTooLong {
limit: usize,
},
Grammar {
source: SseError,
},
}Expand description
Why a byte stream did not yield frames this client can hand on.
Separate from SseError on purpose. SseError is the wire grammar’s
vocabulary and lives with the codec that both sides share; the length bound
is this reader’s memory policy, not a rule a peer could observe if we chose
a different number.
Variants§
BlockTooLong
The peer sent more than MAX_BLOCK bytes without a block terminator.
Grammar
The block was terminated but is not a frame.
Trait Implementations§
Source§impl Debug for FrameError
impl Debug for FrameError
Source§impl Display for FrameError
impl Display for FrameError
Source§impl Error for FrameError
impl Error for FrameError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<FrameError> for HttpClientError
Maps a frame failure onto the one enum a caller above this layer matches.
impl From<FrameError> for HttpClientError
Maps a frame failure onto the one enum a caller above this layer matches.
BlockTooLong is the one variant that does not come straight from the
shared grammar, so it says what actually happened rather than borrowing a
codec error that would name the wrong thing.
Source§fn from(error: FrameError) -> Self
fn from(error: FrameError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FrameError
impl RefUnwindSafe for FrameError
impl Send for FrameError
impl Sync for FrameError
impl Unpin for FrameError
impl UnsafeUnpin for FrameError
impl UnwindSafe for FrameError
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