Struct TryGetError

pub struct TryGetError { pub requested: usize, pub available: usize }

Error type for the try_get_ methods of Buf. Indicates that there were not enough remaining bytes in the buffer while attempting to get a value from a Buf with one of the try_get_ methods.

Fields

requested: usize

The number of bytes necessary to get the value

available: usize

The number of bytes available in the buffer

Trait Implementations

impl Debug for TryGetError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for TryGetError

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

impl Eq for TryGetError

impl Error for TryGetError

impl PartialEq for TryGetError

fn eq(&self, other: &TryGetError) -> bool

impl StructuralPartialEq for TryGetError

Auto Trait Implementations

impl Freeze for TryGetError

impl RefUnwindSafe for TryGetError

impl Send for TryGetError

impl Sync for TryGetError

impl Unpin for TryGetError

impl UnsafeUnpin for TryGetError

impl UnwindSafe for TryGetError

Blanket Implementations

impl<T> Any for TryGetError where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TryGetError where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TryGetError where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for TryGetError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToString for TryGetError where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T, U> Into<U> for TryGetError where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for TryGetError where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for TryGetError where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>