Struct minify_js::SyntaxError
source · pub struct SyntaxError<'a> {
pub source: SourceRange<'a>,
pub typ: SyntaxErrorType,
pub actual_token: Option<TokenType>,
}
Fields§
§source: SourceRange<'a>
§typ: SyntaxErrorType
§actual_token: Option<TokenType>
Implementations§
source§impl<'a> SyntaxError<'a>
impl<'a> SyntaxError<'a>
pub fn new( typ: SyntaxErrorType, source: SourceRange<'a>, actual_token: Option<TokenType> ) -> SyntaxError<'a>
pub fn from_loc( loc: SourceRange<'a>, typ: SyntaxErrorType, actual_token: Option<TokenType> ) -> SyntaxError<'a>
Trait Implementations§
source§impl<'a> Clone for SyntaxError<'a>
impl<'a> Clone for SyntaxError<'a>
source§fn clone(&self) -> SyntaxError<'a>
fn clone(&self) -> SyntaxError<'a>
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<'a> Debug for SyntaxError<'a>
impl<'a> Debug for SyntaxError<'a>
source§impl<'a> Display for SyntaxError<'a>
impl<'a> Display for SyntaxError<'a>
source§impl<'a> Error for SyntaxError<'a>
impl<'a> Error for SyntaxError<'a>
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
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'a> PartialEq<SyntaxError<'a>> for SyntaxError<'a>
impl<'a> PartialEq<SyntaxError<'a>> for SyntaxError<'a>
source§fn eq(&self, other: &SyntaxError<'a>) -> bool
fn eq(&self, other: &SyntaxError<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Eq for SyntaxError<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SyntaxError<'a>
impl<'a> !Send for SyntaxError<'a>
impl<'a> !Sync for SyntaxError<'a>
impl<'a> Unpin for SyntaxError<'a>
impl<'a> UnwindSafe for SyntaxError<'a>
Blanket Implementations§
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more