pub async fn with_logging<F, U, T>(&self, f: F) -> crate::Result<T>
    where
        U: Future<Output = crate::Result<T>>,
        F: FnOnce() -> U,
    {
        match self.subscriber {
            Subscriber::Normal(ref subscriber) => f().with_subscriber(subscriber.clone()).await,
            Subscriber::WithTelemetry(ref subscriber) => f().with_subscriber(subscriber.clone()).await,
        }
    }
/// Wraps a future to a logger, storing all events in the pipeline to
/// the channel.
Wraps a future to a logger, storing all events in the pipeline to
the channel.
Wraps a future to a logger storing all events in the pipeline to the channel .
pub async fn with_logging<F, U, T>(&self, f: F) -> crate::Result<T>
    where
        U: Future<Output = crate::Result<T>>,
        F: FnOnce() -> U,
    {
        match self.subscriber {
            Subscriber::Normal(ref subscriber) => f().with_subscriber(subscriber.clone()).await,
            Subscriber::WithTelemetry(ref subscriber) => f().with_subscriber(subscriber.clone()).await,
        }
    }
pub async fn with_logging < F , U , T > ( & self , f : F ) -> crate :: Result < T > where U : Future < Output = crate :: Result < T > > , F : FnOnce ( ) -> U , { match self . subscriber { Subscriber :: Normal ( ref subscriber ) => f ( ) . with_subscriber ( subscriber . clone ( ) ) . await , Subscriber :: WithTelemetry ( ref subscriber ) => f ( ) . with_subscriber ( subscriber . clone ( ) ) . await , } }
Wraps a future to a logger, storing all events in the pipeline to
the channel.
Wraps a future to a logger storing all events in the pipeline to the channel .
&self
f
F