logo
pub struct FilterId(_);
Expand description

Uniquely identifies an individual Filter instance in the context of a Subscriber.

When adding a Filtered Layer to a Subscriber, the Subscriber generates a FilterId for that Filtered layer. The Filtered layer will then use the generated ID to query whether a particular span was previously enabled by that layer’s Filter.

Note: Currently, the Registry type provided by this crate is the only Subscriber implementation capable of participating in per-layer filtering. Therefore, the FilterId type cannot currently be constructed by code outside of tracing-subscriber. In the future, new APIs will be added to tracing-subscriber to allow non-Registry Subscribers to also participate in per-layer filtering. When those APIs are added, subscribers will be responsible for generating and assigning FilterIds.

Trait Implementations

Formats the value using the given formatter.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)

Uses borrowed data to replace owned data, usually by cloning. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more