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
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
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<InvalidPatternError> for InvalidPatternError
impl PartialEq<InvalidPatternError> for InvalidPatternError
source§fn eq(&self, other: &InvalidPatternError) -> bool
fn eq(&self, other: &InvalidPatternError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.