pub struct OnlyBodies(());
Expand description

Do not visit nested item-like things, but visit nested things that are inside of an item-like.

Notably, possible occurrences of bodies in non-item-like things include: closures/generators, inline const {} blocks, and constant arguments of types, e.g. in let _: [(); /* HERE */];.

This is the most common choice. A very common pattern is to use visit_all_item_likes_in_crate() as an outer loop, and to have the visitor that visits the contents of each item using this setting.

Tuple Fields§

§0: ()

Trait Implementations§

Whether the visitor visits nested “item-like” things. E.g., item, impl-item. Read more
Whether the visitor visits “intra item-like” things. E.g., function body, closure, AnonConst 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.

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.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes