Struct litrs::InvalidToken [−][src]
pub struct InvalidToken { /* fields omitted */ }
Expand description
An error signaling that a different kind of token was expected. Returned by
the various TryFrom
impls.
Implementations
impl InvalidToken
[src]
impl InvalidToken
[src]pub fn to_compile_error(&self) -> TokenStream
[src]
pub fn to_compile_error(&self) -> TokenStream
[src]Returns a token stream representing compile_error!("msg");
where
"msg"
is the output of self.to_string()
. Panics if called outside
of a proc-macro context!
pub fn to_compile_error2(&self) -> TokenStream
[src]
pub fn to_compile_error2(&self) -> TokenStream
[src]Like to_compile_error
, but returns a token
stream from proc_macro2
and does not panic outside of a proc-macro
context.
Trait Implementations
impl Clone for InvalidToken
[src]
impl Clone for InvalidToken
[src]fn clone(&self) -> InvalidToken
[src]
fn clone(&self) -> InvalidToken
[src]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)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InvalidToken
[src]
impl Debug for InvalidToken
[src]impl Display for InvalidToken
[src]
impl Display for InvalidToken
[src]impl Error for InvalidToken
[src]
impl Error for InvalidToken
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl Copy for InvalidToken
[src]
Auto Trait Implementations
impl RefUnwindSafe for InvalidToken
impl !Send for InvalidToken
impl !Sync for InvalidToken
impl Unpin for InvalidToken
impl UnwindSafe for InvalidToken
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more