Struct hdk::trace::WasmSubscriber
source · [−]pub struct WasmSubscriber { /* private fields */ }
Trait Implementations
sourceimpl Default for WasmSubscriber
impl Default for WasmSubscriber
sourcefn default() -> WasmSubscriber
fn default() -> WasmSubscriber
Returns the “default value” for a type. Read more
sourceimpl Subscriber for WasmSubscriber
impl Subscriber for WasmSubscriber
By implementing WasmSubscriber we integrate the rust tracing crate with the __trace host_fn without inventing some DIY DSL
Currently supports all the event macros for tracing such as trace!
, info!
, debug!
, warn!
, error!
.
Does NOT support spans, so attempting to #[instrument]
a function or similar will panic the wasm.
sourcefn new_span(&self, _attributes: &Attributes<'_>) -> Id
fn new_span(&self, _attributes: &Attributes<'_>) -> Id
Not really implemented yet. Placeholder logic only.
sourcefn record_follows_from(&self, _span: &Id, _follows: &Id)
fn record_follows_from(&self, _span: &Id, _follows: &Id)
Adds an indication that span
follows from the span with the id
follows
. Read more
sourcefn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Registers a new callsite with this subscriber, returning whether or not the subscriber is interested in being notified about the callsite. Read more
sourcefn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Returns the highest verbosity level that this Subscriber
will
enable, or None
, if the subscriber does not implement level-based
filtering or chooses not to implement this method. Read more
sourcefn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
sourcefn drop_span(&self, _id: Id)
fn drop_span(&self, _id: Id)
use Subscriber::try_close
instead
This method is deprecated. Read more
sourcefn current_span(&self) -> Current
fn current_span(&self) -> Current
Returns a type representing this subscriber’s view of the current span. Read more
Auto Trait Implementations
impl RefUnwindSafe for WasmSubscriber
impl Send for WasmSubscriber
impl Sync for WasmSubscriber
impl Unpin for WasmSubscriber
impl UnwindSafe for WasmSubscriber
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more