Struct spinoso_regexp::SyntaxError [−][src]
Error that indicates a given Regexp
pattern could not be parsed when given
as a /.../
literal in Ruby source code.
This error is typically generated at parse-time.
This error corresponds to the Ruby SyntaxError
Exception class.
Examples
let err = SyntaxError::new(); assert_eq!(err.message(), "SyntaxError"); let err = SyntaxError::with_message("premature end of char-class"); assert_eq!(err.message(), "premature end of char-class");
Implementations
impl SyntaxError
[src]
#[must_use]pub const fn new() -> Self
[src]
Construct a new, default syntax error.
Examples
const ERR: SyntaxError = SyntaxError::new(); assert_eq!(ERR.message(), "SyntaxError");
#[must_use]pub const fn with_message(message: &'static str) -> Self
[src]
Construct a new syntax error with a message.
Examples
const ERR: SyntaxError = SyntaxError::with_message("premature end of char-class"); assert_eq!(ERR.message(), "premature end of char-class");
#[must_use]pub fn message(&self) -> &str
[src]
Retrieve the exception message associated with this syntax error.
Examples
let err = SyntaxError::new(); assert_eq!(err.message(), "SyntaxError"); let err = SyntaxError::with_message("premature end of char-class"); assert_eq!(err.message(), "premature end of char-class");
Trait Implementations
impl Clone for SyntaxError
[src]
fn clone(&self) -> SyntaxError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SyntaxError
[src]
impl Display for SyntaxError
[src]
impl Eq for SyntaxError
[src]
impl Error for SyntaxError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<&'static str> for SyntaxError
[src]
impl From<String> for SyntaxError
[src]
impl From<SyntaxError> for Error
[src]
fn from(err: SyntaxError) -> Self
[src]
impl Hash for SyntaxError
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SyntaxError
[src]
fn cmp(&self, other: &SyntaxError) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<SyntaxError> for SyntaxError
[src]
fn eq(&self, other: &SyntaxError) -> bool
[src]
fn ne(&self, other: &SyntaxError) -> bool
[src]
impl PartialOrd<SyntaxError> for SyntaxError
[src]
fn partial_cmp(&self, other: &SyntaxError) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for SyntaxError
[src]
impl StructuralPartialEq for SyntaxError
[src]
Auto Trait Implementations
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,