pub struct ConstGeneric {
pub const_token: Ident,
pub ident: Ident,
pub constraints: Vec<TokenTree>,
}Expand description
a const generic parameter, e.g. struct Foo<const N: usize> { .. }
Fields§
§const_token: IdentThe const token for this generic
ident: IdentThe ident of this generic
constraints: Vec<TokenTree>The “constraints” (type) of this generic, e.g. the usize from const N: usize
Trait Implementations§
Source§impl Clone for ConstGeneric
impl Clone for ConstGeneric
Source§fn clone(&self) -> ConstGeneric
fn clone(&self) -> ConstGeneric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstGeneric
impl Debug for ConstGeneric
Source§impl From<ConstGeneric> for Generic
impl From<ConstGeneric> for Generic
Source§fn from(gen: ConstGeneric) -> Self
fn from(gen: ConstGeneric) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConstGeneric
impl RefUnwindSafe for ConstGeneric
impl !Send for ConstGeneric
impl !Sync for ConstGeneric
impl Unpin for ConstGeneric
impl UnsafeUnpin for ConstGeneric
impl UnwindSafe for ConstGeneric
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