#[repr(transparent)]pub struct StaticTid<T: 'static>(pub T);
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<'a> Generatable<'a, StaticTid<Ident>> for Trait<'a>
impl<'a> Generatable<'a, StaticTid<Ident>> for Trait<'a>
Source§const EMITS_NON_CONSTANT_CODE: bool = true
const EMITS_NON_CONSTANT_CODE: bool = true
Set this to true when any of the emitted code may be non-constant
Source§type GeneratableData = ()
type GeneratableData = ()
The type of any data passed from the
Generatable
stage to proceeding stages.Source§type TemplateData = Ident
type TemplateData = Ident
The type of any data passed from the
Template
stage to proceeding stages.Source§fn template(
&self,
_: &mut Context<'_>,
_passed: &Self::GeneratableData,
) -> PassedData<Self::TemplateData>
fn template( &self, _: &mut Context<'_>, _passed: &Self::GeneratableData, ) -> PassedData<Self::TemplateData>
This is the method the
Template
stage is composed of. Should return Tokens (if any) generated by this stage,
plus optionally any data passed to preceding stages.Source§fn assert(
&self,
_context: &mut Context<'_>,
(_, assert_trait_bound): (&Self::GeneratableData, &Self::TemplateData),
to_assert: &StaticTid<Ident>,
) -> Option<TokenStream>
fn assert( &self, _context: &mut Context<'_>, (_, assert_trait_bound): (&Self::GeneratableData, &Self::TemplateData), to_assert: &StaticTid<Ident>, ) -> Option<TokenStream>
This is the method the
Assert
stage is composed of. Should return Tokens generated by this stage.Source§fn generatable(_context: &mut Context<'_>) -> PassedData<Self::GeneratableData>where
Self: Sized,
fn generatable(_context: &mut Context<'_>) -> PassedData<Self::GeneratableData>where
Self: Sized,
This is the method the
Generatable
stage is composed of. Should return Tokens (if any) generated by this stage,
plus optionally any data passed to preceding stages.Source§impl<T: 'static + Ord> Ord for StaticTid<T>
impl<T: 'static + Ord> Ord for StaticTid<T>
Source§impl<T: 'static + PartialOrd> PartialOrd for StaticTid<T>
impl<T: 'static + PartialOrd> PartialOrd for StaticTid<T>
Source§impl<T: 'static + ToTokens> ToTokens for StaticTid<T>
impl<T: 'static + ToTokens> ToTokens for StaticTid<T>
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,
impl<T: 'static + Eq> Eq for StaticTid<T>
impl<'a, T: 'static> TidAble<'a> for StaticTid<T>
Auto Trait Implementations§
impl<T> Freeze for StaticTid<T>where
T: Freeze,
impl<T> RefUnwindSafe for StaticTid<T>where
T: RefUnwindSafe,
impl<T> Send for StaticTid<T>where
T: Send,
impl<T> Sync for StaticTid<T>where
T: Sync,
impl<T> Unpin for StaticTid<T>where
T: Unpin,
impl<T> UnwindSafe for StaticTid<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T
behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T
behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T
behind Rc
pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T
behind Arc
pointerSource§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<'a, T, U> ResolveBounds<'a, T> for Uwhere
T: AssertableWithBounds<'a, U> + 'a,
impl<'a, T, U> ResolveBounds<'a, T> for Uwhere
T: AssertableWithBounds<'a, U> + 'a,
fn resolve_for( self, assertable: impl Into<MaybeBorrowed<'a, T>>, ) -> ResolvedBounds<'a, U, T>
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.Source§impl<'a, X> TidExt<'a> for X
impl<'a, X> TidExt<'a> for X
Source§fn is<T>(&self) -> boolwhere
T: Tid<'a>,
fn is<T>(&self) -> boolwhere
T: Tid<'a>,
Returns true if type behind self is equal to the type of T.
Source§fn downcast_ref<'b, T>(&'b self) -> Option<&'b T>where
T: Tid<'a>,
fn downcast_ref<'b, T>(&'b self) -> Option<&'b T>where
T: Tid<'a>,
Attempts to downcast self to
T
behind referenceSource§fn downcast_mut<'b, T>(&'b mut self) -> Option<&'b mut T>where
T: Tid<'a>,
fn downcast_mut<'b, T>(&'b mut self) -> Option<&'b mut T>where
T: Tid<'a>,
Attempts to downcast self to
T
behind mutable referenceSource§fn downcast_rc<T>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Tid<'a>,
fn downcast_rc<T>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Tid<'a>,
Attempts to downcast self to
T
behind Rc
pointerSource§fn downcast_arc<T>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Tid<'a>,
fn downcast_arc<T>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Tid<'a>,
Attempts to downcast self to
T
behind Arc
pointer