pub trait RecordAttribute {
const FIELD_NAMES: &'static [&'static str];
const PLURALIZE_FIELD_NAMES: bool = false;
// Required method
fn record_attribute(&self) -> impl Value + '_;
}Expand description
Converts a value into its canonical tracing attribute representation.
Values passed to the Miden tracing span and event macros must implement this trait.
Implementations decide the allowed scalar field names, the attribute’s primitive type, and its
formatting, allowing tracing macros to use one name and representation consistently at every
recording site. Collection implementations derive their field names by appending s to these
scalar names.
Required Associated Constants§
Sourceconst FIELD_NAMES: &'static [&'static str]
const FIELD_NAMES: &'static [&'static str]
Scalar field names associated with this value’s type.
Provided Associated Constants§
Sourceconst PLURALIZE_FIELD_NAMES: bool = false
const PLURALIZE_FIELD_NAMES: bool = false
Whether the final component of each field name must have an s suffix.
Required Methods§
Sourcefn record_attribute(&self) -> impl Value + '_
fn record_attribute(&self) -> impl Value + '_
Returns the value that is passed to tracing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".