pub struct NotEnoughData {
pub stage: &'static str,
pub item: &'static str,
pub msg: &'static str,
pub expected: usize,
pub got: usize,
pub buffer: BytesMut,
}
Expand description
Raised when definitely more data is necessary
Fields§
§stage: &'static str
The stage at which we are missing data
item: &'static str
The item that is missing data to wrok
msg: &'static str
Human readable message
expected: usize
How many bytes where expected
got: usize
How many bytes where available
buffer: BytesMut
The problematic bytes
Implementations§
Trait Implementations§
Source§impl Debug for NotEnoughData
impl Debug for NotEnoughData
Source§impl Display for NotEnoughData
impl Display for NotEnoughData
Source§impl Error for NotEnoughData
impl Error for NotEnoughData
1.30.0 · 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<NotEnoughData> for ProtocolError
impl From<NotEnoughData> for ProtocolError
Source§fn from(source: NotEnoughData) -> Self
fn from(source: NotEnoughData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NotEnoughData
impl RefUnwindSafe for NotEnoughData
impl Send for NotEnoughData
impl Sync for NotEnoughData
impl Unpin for NotEnoughData
impl UnwindSafe for NotEnoughData
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> 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