pub struct Error {
pub kind: Box<ErrorKind>,
}Fields§
§kind: Box<ErrorKind>Implementations§
Source§impl Error
impl Error
pub fn new(kind: ErrorKind) -> Error
pub fn io_error(err: Error) -> Error
pub fn unexpected_char(character: char, span: Span) -> Error
pub fn expected_char(expected: char, found: char, span: Span) -> Error
pub fn expected_string(expected: String, found: String, span: Span) -> Error
pub fn expected_one_of( expected: Vec<String>, found: String, span: Span, ) -> Error
pub fn expected_closing_tag( expected: String, found: String, span: Span, ) -> Error
pub fn invalid_i18n(format: String, span: Span) -> Error
pub fn unsupported_i18n_format(format: String, span: Span) -> Error
pub fn not_implemented(feature: String, span: Span) -> Error
pub fn parse_error(message: String, span: Span) -> Error
pub fn parse_float_error(source: String, span: Span) -> Error
pub fn trailing_content(span: Span) -> Error
pub fn external_error(source: String, details: String, span: Span) -> Error
pub fn codegen_error(message: String, span: Span) -> Error
pub fn regex_error(err: Error) -> Error
pub fn dialoguer_error(err: Error) -> Error
pub fn span(&self) -> Span
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more