#[non_exhaustive]pub enum FixedStrError {
Overflow {
available: usize,
found: usize,
},
InvalidUtf8,
}Expand description
Custom error type for FixedStr conversions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Overflow
Thrown when the input exceeds the available capacity.
available: The number of bytes available in the buffer.found: The length of the input.
InvalidUtf8
Thrown when the byte content cannot be parsed as valid UTF-8.
Trait Implementations§
Source§impl Clone for FixedStrError
impl Clone for FixedStrError
Source§fn clone(&self) -> FixedStrError
fn clone(&self) -> FixedStrError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedStrError
impl Debug for FixedStrError
Source§impl Display for FixedStrError
impl Display for FixedStrError
Source§impl Error for FixedStrError
Available on crate feature std only.
impl Error for FixedStrError
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 PartialEq for FixedStrError
impl PartialEq for FixedStrError
impl Copy for FixedStrError
impl Eq for FixedStrError
impl StructuralPartialEq for FixedStrError
Auto Trait Implementations§
impl Freeze for FixedStrError
impl RefUnwindSafe for FixedStrError
impl Send for FixedStrError
impl Sync for FixedStrError
impl Unpin for FixedStrError
impl UnwindSafe for FixedStrError
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