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 i
th element of the
RegisterDebugInfo::FieldValueEnumTypes
associated type sequence
corresponds to the i
th element of the array returned by the
RegisterDebugInfo::field_names
method.
Required Associated Types§
Sourcetype FieldValueEnumTypes: FieldValueEnumSeq<T>
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§
Sourcefn field_names() -> &'static [&'static str]
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
i
th position in the FieldValueEnumTypes
sequence and element at
the i
th position in the fields
return value.
Sourcefn fields() -> &'static [Field<T, Self>]where
Self: Sized,
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 i
th position in the FieldValueEnumTypes
sequence and element
at the i
th position in the field_names
return value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.