pub struct WrongOutputLength { /* private fields */ }
Expand description
When the array returned by decode
or encode
isn’t the
length that the arguments would produce.
§Example
§Base 64
use const_base::{Config, DecodeError, WrongOutputLength, decode};
const DECODED: Result<[u8; 8], DecodeError> = decode(b"AAAAAA", Config::B64);
match DECODED {
Err(DecodeError::WrongOutputLength(err)) => {
assert_eq!(err.expected(), 4);
assert_eq!(err.found(), 8);
}
_ => unreachable!()
}
Implementations§
Trait Implementations§
Source§impl Debug for WrongOutputLength
impl Debug for WrongOutputLength
Source§impl PartialEq for WrongOutputLength
impl PartialEq for WrongOutputLength
impl StructuralPartialEq for WrongOutputLength
Auto Trait Implementations§
impl Freeze for WrongOutputLength
impl RefUnwindSafe for WrongOutputLength
impl Send for WrongOutputLength
impl Sync for WrongOutputLength
impl Unpin for WrongOutputLength
impl UnwindSafe for WrongOutputLength
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