pub struct SingletonScope(_, _);
Expand description

A Scope plus field values

This supports dereference to a Scope, allowing macro expansion via Scope::apply_attrs and other manipulation.

Tokens may be generated by Self::expand.

Implementations§

Generate the TokenStream

This is a convenience function. It is valid to, instead, (1) call Scope::expand_impl_self on self, then (2) use the ToTokens impl on Scope.

Methods from Deref<Target = Scope>§

Apply attribute rules

The supplied rules are applied in the order of definition, and their attributes removed from the item.

Expand impl Self

This is done automatically by Self::expand. It may be called earlier by a ScopeAttr if required. Calling multiple times is harmless.

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Write self to the given TokenStream. Read more
Convert self directly into a TokenStream object. Read more
Convert self directly into a TokenStream object. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.