#[non_exhaustive]pub enum TextContentError {
Empty,
TooLong {
max: usize,
actual: usize,
},
DisallowedCodePoint {
byte_index: usize,
},
}Expand description
Validation failure for TextContent.
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.
Empty
The text contained no bytes.
TooLong
The text exceeded TextContent::MAX_BYTES.
DisallowedCodePoint
A control or Unicode noncharacter was present.
Trait Implementations§
Source§impl Clone for TextContentError
impl Clone for TextContentError
Source§impl Debug for TextContentError
impl Debug for TextContentError
Source§impl Display for TextContentError
impl Display for TextContentError
impl Eq for TextContentError
Source§impl Error for TextContentError
impl Error for TextContentError
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 TextContentError
impl PartialEq for TextContentError
impl StructuralPartialEq for TextContentError
Auto Trait Implementations§
impl Forget for TextContentError
impl Freeze for TextContentError
impl Move for TextContentError
impl RefUnwindSafe for TextContentError
impl Send for TextContentError
impl Sync for TextContentError
impl Unpin for TextContentError
impl UnsafeUnpin for TextContentError
impl UnwindSafe for TextContentError
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