Struct hdk::trace::WasmSubscriber
source · pub struct WasmSubscriber {
pub ids: AtomicUsize,
}
Fields
ids: AtomicUsize
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)
sourcefn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
sourcefn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
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 moresourcefn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
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)
👎Deprecated since 0.1.2: use
Subscriber::try_close
insteadThis 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
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref