pub struct ControlCharError {
pub byte_index: usize,
pub character: char,
}Expand description
An error indicating that a control character was found in a string when constructing
a [SafeString].
Fields§
§byte_index: usizeThe byte index in the string where the first control character was encountered.
character: charThe control character that was encountered.
Implementations§
Trait Implementations§
Source§impl Clone for ControlCharError
impl Clone for ControlCharError
Source§fn clone(&self) -> ControlCharError
fn clone(&self) -> ControlCharError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ControlCharError
Source§impl Debug for ControlCharError
impl Debug for ControlCharError
Source§impl Display for ControlCharError
impl Display for ControlCharError
impl Eq for ControlCharError
Source§impl Error for ControlCharError
impl Error for ControlCharError
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 ControlCharError
impl PartialEq for ControlCharError
impl StructuralPartialEq for ControlCharError
Auto Trait Implementations§
impl Freeze for ControlCharError
impl RefUnwindSafe for ControlCharError
impl Send for ControlCharError
impl Sync for ControlCharError
impl Unpin for ControlCharError
impl UnsafeUnpin for ControlCharError
impl UnwindSafe for ControlCharError
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