Struct Config

Source
#[non_exhaustive]
pub struct Config {
Show 23 fields pub peripheral_name: Option<IdentifierFormat>, pub peripheral_base_address: NumberFormat, pub peripheral_sorting: DerivableSorting, pub address_block_offset: NumberFormat, pub address_block_size: NumberFormat, pub interrupt_name: Option<IdentifierFormat>, pub cluster_name: Option<IdentifierFormat>, pub cluster_address_offset: NumberFormat, pub register_cluster_sorting: RcSorting, pub register_name: Option<IdentifierFormat>, pub register_address_offset: NumberFormat, pub register_size: NumberFormat, pub register_reset_value: NumberFormat, pub register_reset_mask: NumberFormat, pub field_name: Option<IdentifierFormat>, pub field_bit_range: Option<FieldBitRangeFormat>, pub field_sorting: DerivableSorting, pub enumerated_values_name: Option<IdentifierFormat>, pub enumerated_value_name: Option<IdentifierFormat>, pub enumerated_value_value: NumberFormat, pub dim_dim: NumberFormat, pub dim_increment: NumberFormat, pub dim_array_index_header_enum_name: Option<IdentifierFormat>,
}
Expand description

Advanced encoder options

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§peripheral_name: Option<IdentifierFormat>

Format of peripheral’s name-kind elements

  • derivedFrom
  • name
  • alternatePeripheral
  • prependToName
  • appendToName
  • headerStructName
§peripheral_base_address: NumberFormat

Format of peripheral’s baseAddress element

format: hex, dec

§peripheral_sorting: DerivableSorting

Sort peripherals in specified order

§address_block_offset: NumberFormat

Format of addressBlock’s offset element

format: hex, dec

§address_block_size: NumberFormat

Format of addressBlock’s size element

format: hex, dec

§interrupt_name: Option<IdentifierFormat>

Format of interrupt’s name-kind elements

  • name
§cluster_name: Option<IdentifierFormat>

Format of cluster’s name-kind elements

  • derivedFrom
  • name
  • alternateCluster
§cluster_address_offset: NumberFormat

Format of cluster’s addressOffset element

format: hex, dec

§register_cluster_sorting: RcSorting

Sort registers and clusters in specified order

§register_name: Option<IdentifierFormat>

Format of register’s name-kind elements

  • derivedFrom
  • name
  • alternateRegister
§register_address_offset: NumberFormat

Format of register’s addressOffset element

format: hex, dec

§register_size: NumberFormat

Format of register’s size element

format: hex, dec

§register_reset_value: NumberFormat

Format of register’s resetValue element

format: hex, dec

§register_reset_mask: NumberFormat

Format of register’s resetMask element

format: hex, dec

§field_name: Option<IdentifierFormat>

Format of field’s name-kind elements

  • derivedFrom
  • name
§field_bit_range: Option<FieldBitRangeFormat>

Format of field’s bitRange

None means keep the original bitRange

§field_sorting: DerivableSorting

Sort fields in specified order

§enumerated_values_name: Option<IdentifierFormat>

Format of enumeratedValues’s name-kind elements

  • derivedFrom
  • name
§enumerated_value_name: Option<IdentifierFormat>

Format of enumeratedValue’s name-kind elements

  • name
§enumerated_value_value: NumberFormat

Format of enumeratedValue’s value element

format: hex, dec, bing

§dim_dim: NumberFormat

Format of dim’s dim element

format: hex, dec

§dim_increment: NumberFormat

Format of dim’s dimIncrement element

format: hex, dec

§dim_array_index_header_enum_name: Option<IdentifierFormat>

Format of dimArrayIndex’s headerEnumName element

Implementations§

Source§

impl Config

Source

pub fn update(&mut self, name: &str, value: &str)

Update the config with given name and value

panic if the value is not valid

Source

pub fn peripheral_name(self, val: Option<IdentifierFormat>) -> Self

Format of peripheral’s name-kind elements

Source

pub fn peripheral_base_address(self, val: NumberFormat) -> Self

Format of peripheral’s baseAddress element

format: hex, dec

Source

pub fn peripheral_sorting(self, val: DerivableSorting) -> Self

Sort peripherals in specified order

None means keep the original order

Source

pub fn address_block_offset(self, val: NumberFormat) -> Self

Format of addressBlock’s offset element

format: hex, dec

Source

pub fn address_block_size(self, val: NumberFormat) -> Self

Format of addressBlock’s size element

format: hex, dec

Source

pub fn interrupt_name(self, val: Option<IdentifierFormat>) -> Self

Format of interrupt’s name-kind elements

Source

pub fn cluster_name(self, val: Option<IdentifierFormat>) -> Self

Format of cluster’s name-kind elements

Source

pub fn cluster_address_offset(self, val: NumberFormat) -> Self

Format of cluster’s addressOffset element

format: hex, dec

Source

pub fn register_cluster_sorting(self, val: RcSorting) -> Self

Sort registers and clusters in specified order

None means keep the original order

Source

pub fn register_name(self, val: Option<IdentifierFormat>) -> Self

Format of register’s name-kind elements

Source

pub fn register_address_offset(self, val: NumberFormat) -> Self

Format of register’s addressOffset element

format: hex, dec

Source

pub fn register_size(self, val: NumberFormat) -> Self

Format of register’s size element

format: hex, dec

Source

pub fn register_reset_value(self, val: NumberFormat) -> Self

Format of register’s resetValue element

format: hex, dec

Source

pub fn register_reset_mask(self, val: NumberFormat) -> Self

Format of register’s resetMask element

format: hex, dec

Source

pub fn field_name(self, val: Option<IdentifierFormat>) -> Self

Format of field’s name-kind elements

Source

pub fn field_bit_range(self, val: Option<FieldBitRangeFormat>) -> Self

Format of field’s bitRange

None means keep the original bitRange

Source

pub fn field_sorting(self, val: DerivableSorting) -> Self

Sort fields in specified order

None means keep the original order

Source

pub fn enumerated_values_name(self, val: Option<IdentifierFormat>) -> Self

Format of enumeratedValues’s name-kind elements

Source

pub fn enumerated_value_name(self, val: Option<IdentifierFormat>) -> Self

Format of enumeratedValue’s name-kind elements

Source

pub fn enumerated_value_value(self, val: NumberFormat) -> Self

Format of enumeratedValue’s value element

format: hex, dec, bing

Source

pub fn dim_dim(self, val: NumberFormat) -> Self

Format of dim’s dim element

format: hex, dec

Source

pub fn dim_increment(self, val: NumberFormat) -> Self

Format of dim’s dimIncrement element

format: hex, dec

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for Config

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.