[][src]Struct tracing_fmt::filter::reload::Handle

pub struct Handle<F, N> where
    F: Filter<N>, 
{ /* fields omitted */ }

Methods

impl<F, N> Handle<F, N> where
    F: Filter<N> + 'static, 
[src]

pub fn reload(&self, new_filter: impl Into<F>) -> Result<(), Error>[src]

pub fn modify(&self, f: impl FnOnce(&mut F)) -> Result<(), Error>[src]

Invokes a closure with a mutable reference to the current filter, allowing it to be modified in place.

pub fn clone_current(&self) -> Option<F> where
    F: Clone
[src]

Returns a clone of the filter's current value if it still exists. Otherwise, if the filter has been dropped, returns None.

pub fn with_current<T>(&self, f: impl FnOnce(&F) -> T) -> Result<T, Error>[src]

Invokes a closure with a borrowed reference to the current filter, returning the result (or an error if the filter no longer exists).

Trait Implementations

impl<F, N> Clone for Handle<F, N> where
    F: Filter<N>, 
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<F: Debug, N: Debug> Debug for Handle<F, N> where
    F: Filter<N>, 
[src]

Auto Trait Implementations

impl<F, N> Sync for Handle<F, N> where
    F: Send + Sync

impl<F, N> Send for Handle<F, N> where
    F: Send + Sync

impl<F, N> Unpin for Handle<F, N> where
    F: Unpin

impl<F, N> !RefUnwindSafe for Handle<F, N>

impl<F, N> !UnwindSafe for Handle<F, N>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]