Trait rustc_expand::expand::InvocationCollectorNode
source · trait InvocationCollectorNode: HasAttrs + HasNodeId + Sized {
type OutputTy = SmallVec<[Self; 1]>;
type AttrsTy: Deref<Target = [Attribute]> = ThinVec<Attribute>;
const KIND: AstFragmentKind;
fn to_annotatable(self) -> Annotatable;
fn fragment_to_output(fragment: AstFragment) -> Self::OutputTy;
fn descr() -> &'static str { ... }
fn noop_flat_map<V: MutVisitor>(self, _visitor: &mut V) -> Self::OutputTy { ... }
fn noop_visit<V: MutVisitor>(&mut self, _visitor: &mut V) { ... }
fn is_mac_call(&self) -> bool { ... }
fn take_mac_call(self) -> (P<MacCall>, Self::AttrsTy, AddSemicolon) { ... }
fn pre_flat_map_node_collect_attr(
_cfg: &StripUnconfigured<'_>,
_attr: &Attribute
) { ... }
fn post_flat_map_node_collect_bang(
_output: &mut Self::OutputTy,
_add_semicolon: AddSemicolon
) { ... }
fn wrap_flat_map_node_noop_flat_map(
node: Self,
collector: &mut InvocationCollector<'_, '_>,
noop_flat_map: impl FnOnce(Self, &mut InvocationCollector<'_, '_>) -> Self::OutputTy
) -> Result<Self::OutputTy, Self> { ... }
}
Expand description
A trait implemented for all AstFragment
nodes and providing all pieces
of functionality used by InvocationCollector
.
Provided Associated Types
Required Associated Constants
source
const KIND: AstFragmentKind
Required Methods
source
fn to_annotatable(self) -> Annotatable
source
fn fragment_to_output(fragment: AstFragment) -> Self::OutputTy
Provided Methods
source
fn noop_flat_map<V: MutVisitor>(self, _visitor: &mut V) -> Self::OutputTy
source
fn noop_visit<V: MutVisitor>(&mut self, _visitor: &mut V)
source
fn is_mac_call(&self) -> bool
source
fn take_mac_call(self) -> (P<MacCall>, Self::AttrsTy, AddSemicolon)
sourcefn pre_flat_map_node_collect_attr(
fn pre_flat_map_node_collect_attr(
_cfg: &StripUnconfigured<'_>,
_attr: &Attribute
)
sourcefn post_flat_map_node_collect_bang(
fn post_flat_map_node_collect_bang(
_output: &mut Self::OutputTy,
_add_semicolon: AddSemicolon
)
sourcefn wrap_flat_map_node_noop_flat_map(