pub enum CappedLine {
Line(Vec<u8>),
TooLong,
Eof,
}Expand description
Outcome of one read_line_capped call.
Variants§
Line(Vec<u8>)
A complete line, with the trailing newline (and any \r) stripped,
within the byte cap.
TooLong
The line exceeded the cap. The stream has been advanced past the offending line (drained to the next newline) so reading can resume on the following frame — one oversize line doesn’t kill the connection.
Eof
Clean end of stream: no more data and no partial line pending.
Auto Trait Implementations§
impl Freeze for CappedLine
impl RefUnwindSafe for CappedLine
impl Send for CappedLine
impl Sync for CappedLine
impl Unpin for CappedLine
impl UnsafeUnpin for CappedLine
impl UnwindSafe for CappedLine
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more