pub struct GenericParamList {
pub tk_l_bracket: Punct,
pub params: Punctuated<GenericParam>,
pub tk_r_bracket: Punct,
}Expand description
The generic parameters declared right after your type’s name.
Example input:
struct MyUnitStruct<A, B, C>(A, B, C);Fields§
§tk_l_bracket: Punct§params: Punctuated<GenericParam>§tk_r_bracket: PunctImplementations§
Source§impl GenericParamList
impl GenericParamList
Sourcepub fn with_param(self, param: GenericParam) -> Self
pub fn with_param(self, param: GenericParam) -> Self
Builder method, add a GenericParam.
Add lifetime params to the beginning of the list.
Sourcepub fn as_inline_args(&self) -> InlineGenericArgs<'_>
pub fn as_inline_args(&self) -> InlineGenericArgs<'_>
See InlineGenericArgs for details.
Trait Implementations§
Source§impl Clone for GenericParamList
impl Clone for GenericParamList
Source§fn clone(&self) -> GenericParamList
fn clone(&self) -> GenericParamList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GenericParamList
impl Debug for GenericParamList
Source§impl Default for GenericParamList
impl Default for GenericParamList
Source§impl ToTokens for GenericParamList
impl ToTokens for GenericParamList
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 !Send for GenericParamList
impl !Sync for GenericParamList
impl Freeze for GenericParamList
impl RefUnwindSafe for GenericParamList
impl Unpin for GenericParamList
impl UnsafeUnpin for GenericParamList
impl UnwindSafe for GenericParamList
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