Trait tock_registers::debug::RegisterDebugInfo

source ·
pub trait RegisterDebugInfo<T: UIntLike>: RegisterLongName {
    type FieldValueEnumTypes: FieldValueEnumSeq<T>;

    // Required methods
    fn name() -> &'static str;
    fn field_names() -> &'static [&'static str];
    fn fields() -> &'static [Field<T, Self>]
       where Self: Sized;
}
Expand description

RegisterDebugInfo exposes debugging information from register types.

The exposed information is composed of both types (such as the individual field enum types generated by the crate::register_bitfields macro), as well as runtime-queryable information in the form of data.

Where applicable, the index of type information and runtime-queryable data match. For instance, the ith element of the RegisterDebugInfo::FieldValueEnumTypes associated type sequence corresponds to the ith element of the array returned by the RegisterDebugInfo::field_names method.

Required Associated Types§

source

type FieldValueEnumTypes: FieldValueEnumSeq<T>

Associated type representing a sequence of all field-value enum types of this RegisterLongName register.

See FieldValueEnumSeq. The index of types in this sequence correspond to indices of values returned from the fields and field_names methods.

Required Methods§

source

fn name() -> &'static str

The name of the register.

source

fn field_names() -> &'static [&'static str]

The names of the fields in the register.

The length of the returned slice is identical to the length of the FieldValueEnumTypes sequence and fields return value. For every index i, the element of this slice corresponds to the type at the ith position in the FieldValueEnumTypes sequence and element at the ith position in the fields return value.

source

fn fields() -> &'static [Field<T, Self>]
where Self: Sized,

The fields of a register.

The length of the returned slice is identical to the length of the FieldValueEnumTypes sequence and field_names return value. For every index i, the element of this slice corresponds to the type at the ith position in the FieldValueEnumTypes sequence and element at the ith position in the field_names return value.

Object Safety§

This trait is not object safe.

Implementors§