Struct grep_cli::InvalidPatternError
source · pub struct InvalidPatternError { /* private fields */ }
Expand description
An error that occurs when a pattern could not be converted to valid UTF-8.
The purpose of this error is to give a more targeted failure mode for patterns written by end users that are not valid UTF-8.
Implementations§
source§impl InvalidPatternError
impl InvalidPatternError
sourcepub fn valid_up_to(&self) -> usize
pub fn valid_up_to(&self) -> usize
Returns the index in the given string up to which valid UTF-8 was verified.
Trait Implementations§
source§impl Clone for InvalidPatternError
impl Clone for InvalidPatternError
source§fn clone(&self) -> InvalidPatternError
fn clone(&self) -> InvalidPatternError
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 InvalidPatternError
impl Debug for InvalidPatternError
source§impl Display for InvalidPatternError
impl Display for InvalidPatternError
source§impl Error for InvalidPatternError
impl Error for InvalidPatternError
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<InvalidPatternError> for Error
impl From<InvalidPatternError> for Error
source§fn from(paterr: InvalidPatternError) -> Error
fn from(paterr: InvalidPatternError) -> Error
Converts to this type from the input type.
source§impl PartialEq for InvalidPatternError
impl PartialEq for InvalidPatternError
impl Eq for InvalidPatternError
impl StructuralPartialEq for InvalidPatternError
Auto Trait Implementations§
impl Freeze for InvalidPatternError
impl RefUnwindSafe for InvalidPatternError
impl Send for InvalidPatternError
impl Sync for InvalidPatternError
impl Unpin for InvalidPatternError
impl UnwindSafe for InvalidPatternError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)