pub struct ErrorLengthExceedsMax;Expand description
The error returned by the borrowing Const types’ try_from_slice and
try_from_str constructors when the input length exceeds the type’s MAX.
Unlike Error it is Copy and free of any destructor, so a
Result<_, ErrorLengthExceedsMax> can be matched in a const context (a
Result<_, Error> cannot, because Error owns fields that have
destructors). It converts into Error::LengthExceedsMax via From, so
runtime callers can still propagate it with ?.
Trait Implementations§
Source§impl Clone for ErrorLengthExceedsMax
impl Clone for ErrorLengthExceedsMax
impl Copy for ErrorLengthExceedsMax
Source§impl Debug for ErrorLengthExceedsMax
impl Debug for ErrorLengthExceedsMax
Source§impl Display for ErrorLengthExceedsMax
impl Display for ErrorLengthExceedsMax
impl Eq for ErrorLengthExceedsMax
Source§impl Error for ErrorLengthExceedsMax
Available on crate feature std only.
impl Error for ErrorLengthExceedsMax
Available on crate feature
std only.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<ErrorLengthExceedsMax> for Error
impl From<ErrorLengthExceedsMax> for Error
Source§fn from(_: ErrorLengthExceedsMax) -> Self
fn from(_: ErrorLengthExceedsMax) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ErrorLengthExceedsMax
impl PartialEq for ErrorLengthExceedsMax
impl StructuralPartialEq for ErrorLengthExceedsMax
Auto Trait Implementations§
impl Freeze for ErrorLengthExceedsMax
impl RefUnwindSafe for ErrorLengthExceedsMax
impl Send for ErrorLengthExceedsMax
impl Sync for ErrorLengthExceedsMax
impl Unpin for ErrorLengthExceedsMax
impl UnsafeUnpin for ErrorLengthExceedsMax
impl UnwindSafe for ErrorLengthExceedsMax
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