Struct Interest
pub struct Interest(/* private fields */);Expand description
Indicates a Subscriber’s interest in a particular callsite.
Subscribers return an Interest from their register_callsite methods
in order to determine whether that span should be enabled or disabled.
Implementations§
§impl Interest
impl Interest
pub fn never() -> Interest
Available on crate feature cpu_os_threads only.
pub fn never() -> Interest
cpu_os_threads only.Returns an Interest indicating that the subscriber is never interested
in being notified about a callsite.
If all active subscribers are never() interested in a callsite, it will
be completely disabled unless a new subscriber becomes active.
pub fn sometimes() -> Interest
Available on crate feature cpu_os_threads only.
pub fn sometimes() -> Interest
cpu_os_threads only.Returns an Interest indicating the subscriber is sometimes interested
in being notified about a callsite.
If all active subscribers are sometimes or never interested in a
callsite, the currently active subscriber will be asked to filter that
callsite every time it creates a span. This will be the case until a new
subscriber expresses that it is always interested in the callsite.
pub fn always() -> Interest
Available on crate feature cpu_os_threads only.
pub fn always() -> Interest
cpu_os_threads only.Returns an Interest indicating the subscriber is always interested in
being notified about a callsite.
If any subscriber expresses that it is always() interested in a given
callsite, then the callsite will always be enabled.
pub fn is_never(&self) -> bool
Available on crate feature cpu_os_threads only.
pub fn is_never(&self) -> bool
cpu_os_threads only.Returns true if the subscriber is never interested in being notified
about this callsite.
pub fn is_sometimes(&self) -> bool
Available on crate feature cpu_os_threads only.
pub fn is_sometimes(&self) -> bool
cpu_os_threads only.Returns true if the subscriber is sometimes interested in being notified
about this callsite.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interest
impl RefUnwindSafe for Interest
impl Send for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnwindSafe for Interest
Blanket Implementations§
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.