Struct sp_tracing::WasmMetadata
source · pub struct WasmMetadata {
pub name: Vec<u8>,
pub target: Vec<u8>,
pub level: WasmLevel,
pub file: Vec<u8>,
pub line: u32,
pub module_path: Vec<u8>,
pub is_span: bool,
pub fields: WasmFields,
}
Expand description
Metadata provides generic information about the specifc location of the
span!
or event!
call on the wasm-side.
Fields§
§name: Vec<u8>
The name given to event!
/span!
, &'static str
converted to bytes
target: Vec<u8>
The given target to event!
/span!
– or module-name, &'static str
converted to bytes
level: WasmLevel
The level of this entry
file: Vec<u8>
The file this was emitted from – useful for debugging; &'static str
converted to bytes
line: u32
The specific line number in the file – useful for debugging
module_path: Vec<u8>
The module path; &'static str
converted to bytes
is_span: bool
Whether this is a call to span!
or event!
fields: WasmFields
The list of fields specified in the call
Trait Implementations§
source§impl Clone for WasmMetadata
impl Clone for WasmMetadata
source§fn clone(&self) -> WasmMetadata
fn clone(&self) -> WasmMetadata
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WasmMetadata
impl Debug for WasmMetadata
source§impl Decode for WasmMetadata
impl Decode for WasmMetadata
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl Default for WasmMetadata
impl Default for WasmMetadata
source§impl Encode for WasmMetadata
impl Encode for WasmMetadata
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<&Metadata<'_>> for WasmMetadata
impl From<&Metadata<'_>> for WasmMetadata
source§fn from(wm: &Metadata<'_>) -> WasmMetadata
fn from(wm: &Metadata<'_>) -> WasmMetadata
Converts to this type from the input type.
source§impl From<&WasmMetadata> for &'static Metadata<'static>
impl From<&WasmMetadata> for &'static Metadata<'static>
source§fn from(wm: &WasmMetadata) -> &'static Metadata<'static>
fn from(wm: &WasmMetadata) -> &'static Metadata<'static>
Converts to this type from the input type.
impl EncodeLike<WasmMetadata> for WasmMetadata
Auto Trait Implementations§
impl RefUnwindSafe for WasmMetadata
impl Send for WasmMetadata
impl Sync for WasmMetadata
impl Unpin for WasmMetadata
impl UnwindSafe for WasmMetadata
Blanket Implementations§
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more