Struct Interest
pub struct Interest(/* private field */);
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
fn never() -> SelfReturns an
Interestindicating 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.fn sometimes() -> SelfReturns an
Interestindicating the subscriber is sometimes interested in being notified about a callsite.If all active subscribers are
sometimesorneverinterested 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 isalwaysinterested in the callsite.fn always() -> SelfReturns an
Interestindicating 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.fn is_never(&self) -> boolReturns
trueif the subscriber is never interested in being notified about this callsite.fn is_sometimes(&self) -> boolReturns
trueif the subscriber is sometimes interested in being notified about this callsite.fn is_always(&self) -> boolReturns
trueif the subscriber is always interested in being notified about this callsite.
Trait Implementations
impl Clone for Interest
fn clone(&self) -> Interest
impl Debug for Interest
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for Interest
impl RefUnwindSafe for Interest
impl Send for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnsafeUnpin for Interest
impl UnwindSafe for Interest
Blanket Implementations
impl<T> Any for Interest
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Interest
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Interest
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Interest
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Interest
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Interest
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Interest
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Interest
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Interest
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>