Skip to main content

RecordAttribute

Trait RecordAttribute 

Source
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§

Source

const FIELD_NAMES: &'static [&'static str]

Scalar field names associated with this value’s type.

Provided Associated Constants§

Source

const PLURALIZE_FIELD_NAMES: bool = false

Whether the final component of each field name must have an s suffix.

Required Methods§

Source

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".

Implementations on Foreign Types§

Source§

impl RecordAttribute for AccountId

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for AccountIdPrefix

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for BatchId

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for BlockNumber

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for NoteId

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for Nullifier

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for Path

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for PathBuf

Source§

const FIELD_NAMES: &'static [&'static str] = <Path as RecordAttribute>::FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for StorageMapKey

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for StorageSlotName

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for String

Source§

const FIELD_NAMES: &'static [&'static str] = <str as RecordAttribute>::FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for TransactionId

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for Word

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for bool

Source§

const FIELD_NAMES: &'static [&'static str] = BOOLEAN_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for f32

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for f64

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for i8

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for i16

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for i32

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for i64

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for i128

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for isize

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for str

Source§

const FIELD_NAMES: &'static [&'static str] = STRING_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for u8

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for u16

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for u32

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for u64

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for u128

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl RecordAttribute for usize

Source§

const FIELD_NAMES: &'static [&'static str] = NUMBER_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl<T: Display + RecordAttribute, const N: usize> RecordAttribute for [T; N]

Source§

const FIELD_NAMES: &'static [&'static str] = T::FIELD_NAMES

Source§

const PLURALIZE_FIELD_NAMES: bool = true

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl<T: Display + RecordAttribute> RecordAttribute for Vec<T>

Source§

const FIELD_NAMES: &'static [&'static str] = T::FIELD_NAMES

Source§

const PLURALIZE_FIELD_NAMES: bool = true

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl<T: Display + RecordAttribute> RecordAttribute for [T]

Source§

const FIELD_NAMES: &'static [&'static str] = T::FIELD_NAMES

Source§

const PLURALIZE_FIELD_NAMES: bool = true

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl<T: RecordAttribute + ?Sized> RecordAttribute for &T

Source§

const FIELD_NAMES: &'static [&'static str] = T::FIELD_NAMES

Source§

const PLURALIZE_FIELD_NAMES: bool = T::PLURALIZE_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Source§

impl<T: RecordAttribute> RecordAttribute for Option<T>

Source§

const FIELD_NAMES: &'static [&'static str] = T::FIELD_NAMES

Source§

const PLURALIZE_FIELD_NAMES: bool = T::PLURALIZE_FIELD_NAMES

Source§

fn record_attribute(&self) -> impl Value + '_

Implementors§