pub struct GenericType {
pub path: Path,
pub gen_separator: TokenStream,
pub generic_lifetimes: Punctuated<Lifetime, Comma>,
pub generic_types: Punctuated<Type, Comma>,
pub target: TokenStream,
}Fields§
§path: PathPath to type (core:: in core::Option
gen_separator: TokenStreamSeparator to use, this depends on cast_to_group parameter
generic_lifetimes: Punctuated<Lifetime, Comma>Generic lifetime parameters (there isn’t an example in core::Option
generic_types: Punctuated<Type, Comma>Generic type parameters (T in core::Option
target: TokenStreamThe resulting type (Option in core::Option
Implementations§
Source§impl GenericType
impl GenericType
pub fn push_lifetime_start(&mut self, lifetime: &Lifetime)
pub fn push_types_start(&mut self, types: TokenStream)
pub fn push_types_end(&mut self, types: TokenStream)
Trait Implementations§
Source§impl Clone for GenericType
impl Clone for GenericType
Source§fn clone(&self) -> GenericType
fn clone(&self) -> GenericType
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 Parse for GenericType
impl Parse for GenericType
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ToTokens for GenericType
impl ToTokens for GenericType
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 GenericType
impl RefUnwindSafe for GenericType
impl !Send for GenericType
impl !Sync for GenericType
impl Unpin for GenericType
impl UnwindSafe for GenericType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.