Struct venial::GenericParamList
source · 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: Punct
Implementations§
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 copy 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 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 Freeze for GenericParamList
impl RefUnwindSafe for GenericParamList
impl !Send for GenericParamList
impl !Sync for GenericParamList
impl Unpin 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