pub struct TooLong;
Expand description
An error returned when the slice or string is longer than the header is able to encode.
The headers have a limit of how large lengths they can encode which is usually smaller than
what the whole usize
can hold (at least on 64bit platforms). If they are asked to encode
something larger, this error is returned.
Note that the limits are usually above practical usability limits and if strings of over 4GB are actually needed, the usefulness of this library is questionable (it optimizes for many small strings/slices, the overhead is negligible on these large behemoths).
Trait Implementations§
Source§impl Error for TooLong
impl Error for TooLong
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()
impl Copy for TooLong
Auto Trait Implementations§
impl Freeze for TooLong
impl RefUnwindSafe for TooLong
impl Send for TooLong
impl Sync for TooLong
impl Unpin for TooLong
impl UnwindSafe for TooLong
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