Struct LitBool

struct LitBool { ... }

A boolean literal: true or false.

Fields

value: bool
span: Span

Implementations

impl LitBool

fn new(value: bool, span: Span) -> Self
fn value(self: &Self) -> bool
fn span(self: &Self) -> Span
fn set_span(self: &mut Self, span: Span)
fn token(self: &Self) -> Ident

impl Clone for LitBool

fn clone(self: &Self) -> Self

impl Debug for LitBool

fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result

impl Eq for LitBool

impl Freeze for LitBool

impl Hash for LitBool

fn hash<H>(self: &Self, state: &mut H)
where
    H: Hasher

impl Parse for LitBool

fn parse(input: ParseStream<'_>) -> Result<Self>

impl PartialEq for LitBool

fn eq(self: &Self, other: &Self) -> bool

impl RefUnwindSafe for LitBool

impl Send for LitBool

impl Sync for LitBool

impl ToTokens for LitBool

fn to_tokens(self: &Self, tokens: &mut TokenStream)

impl Token for LitBool

impl Unpin for LitBool

impl UnsafeUnpin for LitBool

impl UnwindSafe for LitBool

impl<T> Any for LitBool

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for LitBool

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for LitBool

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for LitBool

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for LitBool

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Spanned for LitBool

fn span(self: &Self) -> Span

impl<T> ToOwned for LitBool

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for LitBool

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for LitBool

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for LitBool

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>