pub struct Literal { /* private fields */ }
Expand description
A literal of some sort
Implementations§
Source§impl Literal
impl Literal
pub fn i64_unsuffixed(n: i64) -> Self
pub fn usize_unsuffixed(n: usize) -> Self
pub fn u32_unsuffixed(n: u32) -> Self
pub fn u16_unsuffixed(n: u16) -> Self
pub fn u8_unsuffixed(n: u8) -> Self
pub fn byte_string(s: &[u8]) -> Self
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl ToTokens for Literal
impl ToTokens for Literal
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Write
self
to the given TokenStream
.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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