pub struct InvalidWidth {
pub max: usize,
pub got: usize,
}Expand description
A variable-width read/write was requested with an out-of-range byte width.
Returned (via ReadUintError /
WriteUintError) instead of panicking, so a
wire-controlled width is a recoverable data error, not a programming error.
Fields§
§max: usizeMaximum width the operation supports.
got: usizeWidth actually requested.
Trait Implementations§
Source§impl Clone for InvalidWidth
impl Clone for InvalidWidth
Source§fn clone(&self) -> InvalidWidth
fn clone(&self) -> InvalidWidth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InvalidWidth
Source§impl Debug for InvalidWidth
impl Debug for InvalidWidth
Source§impl Display for InvalidWidth
impl Display for InvalidWidth
impl Eq for InvalidWidth
Source§impl Error for InvalidWidth
impl Error for InvalidWidth
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<InvalidWidth> for ReadUintError
impl From<InvalidWidth> for ReadUintError
Source§fn from(e: InvalidWidth) -> Self
fn from(e: InvalidWidth) -> Self
Converts to this type from the input type.
Source§impl From<InvalidWidth> for WriteUintError
impl From<InvalidWidth> for WriteUintError
Source§fn from(e: InvalidWidth) -> Self
fn from(e: InvalidWidth) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidWidth
impl PartialEq for InvalidWidth
impl StructuralPartialEq for InvalidWidth
Auto Trait Implementations§
impl Freeze for InvalidWidth
impl RefUnwindSafe for InvalidWidth
impl Send for InvalidWidth
impl Sync for InvalidWidth
impl Unpin for InvalidWidth
impl UnsafeUnpin for InvalidWidth
impl UnwindSafe for InvalidWidth
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