Struct LitInt
struct LitInt { ... }
An integer literal: 1 or 1u16.
Implementations
impl LitInt
fn new(repr: &str, span: Span) -> Selffn base10_digits(self: &Self) -> &strfn base10_parse<N>(self: &Self) -> Result<N> where N: FromStr, <N as >::Err: DisplayParses the literal into a selected number type.
This is equivalent to
lit.base10_digits().parse()except that the resulting errors will be correctly spanned to point to the literal token in the macro input.use LitInt; use ;fn suffix(self: &Self) -> &strfn span(self: &Self) -> Spanfn set_span(self: &mut Self, span: Span)fn token(self: &Self) -> Literal
impl Clone for LitInt
fn clone(self: &Self) -> Self
impl Debug for LitInt
fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result
impl Display for LitInt
fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result
impl Eq for LitInt
impl Freeze for LitInt
impl From for LitInt
fn from(token: Literal) -> Self
impl Hash for LitInt
fn hash<H>(self: &Self, state: &mut H) where H: Hasher
impl Parse for LitInt
fn parse(input: ParseStream<'_>) -> Result<Self>
impl PartialEq for LitInt
fn eq(self: &Self, other: &Self) -> bool
impl RefUnwindSafe for LitInt
impl Send for LitInt
impl Sync for LitInt
impl ToTokens for LitInt
fn to_tokens(self: &Self, tokens: &mut TokenStream)
impl Token for LitInt
impl Unpin for LitInt
impl UnsafeUnpin for LitInt
impl UnwindSafe for LitInt
impl<T> Any for LitInt
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for LitInt
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for LitInt
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for LitInt
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for LitInt
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Spanned for LitInt
fn span(self: &Self) -> Span
impl<T> ToOwned for LitInt
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for LitInt
fn to_string(self: &Self) -> String
impl<T, U> Into for LitInt
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for LitInt
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for LitInt
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>