pub enum FrameReadError {
EndOfStream,
TooLarge(Vec<u8>),
Unterminated(Vec<u8>),
Io(Error),
}Expand description
A refused frame; display never prints its potentially sensitive bytes.
Variants§
EndOfStream
The stream ended before any frame bytes arrived.
TooLarge(Vec<u8>)
The frame exceeded the caller’s limit, including its newline.
Unterminated(Vec<u8>)
The stream ended with a partial frame and no newline.
Io(Error)
Reading, allocation, frame delivery or post-refusal admission failed.
Implementations§
Source§impl FrameReadError
impl FrameReadError
Sourcepub fn rejected_bytes(&self) -> Option<&[u8]>
pub fn rejected_bytes(&self) -> Option<&[u8]>
Borrow a refused prefix, retained up to the caller limit plus one byte.
Trait Implementations§
Source§impl Debug for FrameReadError
impl Debug for FrameReadError
Source§impl Display for FrameReadError
impl Display for FrameReadError
Source§impl Error for FrameReadError
impl Error for FrameReadError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for FrameReadError
impl !UnwindSafe for FrameReadError
impl Freeze for FrameReadError
impl Send for FrameReadError
impl Sync for FrameReadError
impl Unpin for FrameReadError
impl UnsafeUnpin for FrameReadError
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