pub struct ParseError { /* private fields */ }
Expand description
A newtype for ParseErrorReason
Implementations§
Source§impl ParseError
impl ParseError
pub fn reason(&self) -> &ParseErrorReason
Source§impl ParseError
impl ParseError
Sourcepub fn unexpected_eof(expected: impl Into<String>, span: Span) -> ParseError
pub fn unexpected_eof(expected: impl Into<String>, span: Span) -> ParseError
Construct a ParseErrorReason::Eof
Sourcepub fn extra_tokens(actual: Spanned<impl Into<String>>) -> ParseError
pub fn extra_tokens(actual: Spanned<impl Into<String>>) -> ParseError
Construct a ParseErrorReason::ExtraTokens
Sourcepub fn mismatch(
expected: impl Into<String>,
actual: Spanned<impl Into<String>>,
) -> ParseError
pub fn mismatch( expected: impl Into<String>, actual: Spanned<impl Into<String>>, ) -> ParseError
Construct a ParseErrorReason::Mismatch
Sourcepub fn general_error(
message: impl Into<String>,
label: Spanned<impl Into<String>>,
) -> ParseError
pub fn general_error( message: impl Into<String>, label: Spanned<impl Into<String>>, ) -> ParseError
Construct a ParseErrorReason::GeneralError
Sourcepub fn argument_error(
command: Spanned<impl Into<String>>,
kind: ArgumentError,
) -> ParseError
pub fn argument_error( command: Spanned<impl Into<String>>, kind: ArgumentError, ) -> ParseError
Construct a ParseErrorReason::ArgumentError
Sourcepub fn unclosed(delimiter: String, span: Span) -> ParseError
pub fn unclosed(delimiter: String, span: Span) -> ParseError
Unclosed delimiter
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
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 ParseError
impl Debug for ParseError
Source§impl<'de> Deserialize<'de> for ParseError
impl<'de> Deserialize<'de> for ParseError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ParseError> for ShellError
impl From<ParseError> for ShellError
Convert a ParseError into a ShellError
Source§fn from(error: ParseError) -> ShellError
fn from(error: ParseError) -> ShellError
Converts to this type from the input type.
Source§impl Hash for ParseError
impl Hash for ParseError
Source§impl Ord for ParseError
impl Ord for ParseError
Source§fn cmp(&self, other: &ParseError) -> Ordering
fn cmp(&self, other: &ParseError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParseError
impl PartialEq for ParseError
Source§impl PartialOrd for ParseError
impl PartialOrd for ParseError
Source§impl Serialize for ParseError
impl Serialize for ParseError
impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.