pub enum InvalidRString {
Empty,
DisallowedFirst(String, char),
InvalidChar(String, char, usize),
NonAsciiChar,
Confinement(Error),
}
Variants§
Empty
must contain at least one character.
DisallowedFirst(String, char)
string ‘{0}’ must not start with character ‘{1}’.
InvalidChar(String, char, usize)
string ‘{0}’ contains invalid character ‘{1}’ at position {2}.
NonAsciiChar
string contains non-ASCII character(s).
Confinement(Error)
string has invalid length.
Trait Implementations§
Source§impl Clone for InvalidRString
impl Clone for InvalidRString
Source§fn clone(&self) -> InvalidRString
fn clone(&self) -> InvalidRString
Returns a copy 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 InvalidRString
impl Debug for InvalidRString
Source§impl Display for InvalidRString
impl Display for InvalidRString
Source§impl Error for InvalidRString
impl Error for InvalidRString
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<AsAsciiStrError> for InvalidRString
impl From<AsAsciiStrError> for InvalidRString
Source§fn from(v: AsAsciiStrError) -> Self
fn from(v: AsAsciiStrError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for InvalidRString
impl From<Error> for InvalidRString
Source§impl<O> From<FromAsciiError<O>> for InvalidRString
impl<O> From<FromAsciiError<O>> for InvalidRString
Source§fn from(_: FromAsciiError<O>) -> Self
fn from(_: FromAsciiError<O>) -> Self
Converts to this type from the input type.
Source§impl From<InvalidRString> for String
impl From<InvalidRString> for String
Source§fn from(err: InvalidRString) -> Self
fn from(err: InvalidRString) -> Self
Converts to this type from the input type.
Source§impl Hash for InvalidRString
impl Hash for InvalidRString
Source§impl PartialEq for InvalidRString
impl PartialEq for InvalidRString
impl Eq for InvalidRString
impl StructuralPartialEq for InvalidRString
Auto Trait Implementations§
impl Freeze for InvalidRString
impl RefUnwindSafe for InvalidRString
impl Send for InvalidRString
impl Sync for InvalidRString
impl Unpin for InvalidRString
impl UnwindSafe for InvalidRString
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