Enum checked_rs_macro_impl::params::NumberArg
source · pub enum NumberArg {
Literal(LitInt),
Constant {
kind: NumberKind,
dbl_colon: PathSep,
ident: MinOrMax,
},
}Expand description
Represents the number argument. It can be a literal or a the MIN/MAX constant.
Variants§
Implementations§
source§impl NumberArg
impl NumberArg
pub fn new_min_constant(kind: NumberKind) -> Self
pub fn new_max_constant(kind: NumberKind) -> Self
pub fn into_value(&self, kind: NumberKind) -> NumberValue
sourcepub fn into_literal_as_tokens(&self, kind: NumberKind) -> TokenStream
pub fn into_literal_as_tokens(&self, kind: NumberKind) -> TokenStream
Output the value as a bare literal number in a token stream.
Trait Implementations§
source§impl ToTokens for NumberArg
impl ToTokens for NumberArg
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut 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 NumberArg
impl RefUnwindSafe for NumberArg
impl !Send for NumberArg
impl !Sync for NumberArg
impl Unpin for NumberArg
impl UnwindSafe for NumberArg
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
source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.