Struct pcre2::Error [−][src]
pub struct Error { /* fields omitted */ }
A PCRE2 error.
An error can occur during compilation or during matching. The kind of this error indicates the type of operation being performed when the error occurred.
Methods
impl Error
[src]
impl Error
pub fn kind(&self) -> &ErrorKind
[src]
pub fn kind(&self) -> &ErrorKind
Return the kind of this error.
The kind indicates the type of operation that was attempted which resulted in this error.
pub fn code(&self) -> c_int
[src]
pub fn code(&self) -> c_int
Return the raw underlying PCRE2 error code.
This can be useful if one needs to determine exactly which error
occurred, which can be done with case analysis over the constants
exported in the pcre2-sys
crate.
pub fn offset(&self) -> Option<usize>
[src]
pub fn offset(&self) -> Option<usize>
Return the underlying offset associated with this error, if one exists.
The offset is typically only available for compile time errors, and is supposed to indicate the general position in the pattern where an error occurred.
Trait Implementations
impl Clone for Error
[src]
impl Clone for Error
fn clone(&self) -> Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Error for Error
[src]
impl Error for Error
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for Error
[src]
impl Display for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Debug for Error
[src]
impl Debug for Error