Struct svd_rs::dimelement::DimElement
source · #[non_exhaustive]pub struct DimElement {
pub dim: u32,
pub dim_increment: u32,
pub dim_index: Option<Vec<String>>,
pub dim_name: Option<String>,
pub dim_array_index: Option<DimArrayIndex>,
}
Expand description
Defines arrays and lists.
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.dim: u32
Defines the number of elements in an array or list
dim_increment: u32
Specify the address increment between two neighboring array or list members in the address map
dim_index: Option<Vec<String>>
Specify the strings that substitue the placeholder %s
within name
and displayName
.
By default,
dim_name: Option<String>
Specify the name of the structure. If not defined, then the entry of the name
element is used
dim_array_index: Option<DimArrayIndex>
Grouping element to create enumerations in the header file
Implementations§
source§impl DimElement
impl DimElement
sourcepub fn builder() -> DimElementBuilder
pub fn builder() -> DimElementBuilder
Make a builder for DimElement
sourcepub fn indexes_as_range(&self) -> Option<RangeInclusive<u32>>
pub fn indexes_as_range(&self) -> Option<RangeInclusive<u32>>
Try to represent DimElement
as range of integer indexes
sourcepub fn modify_from(
&mut self,
builder: DimElementBuilder,
lvl: ValidateLevel
) -> Result<(), SvdError>
pub fn modify_from( &mut self, builder: DimElementBuilder, lvl: ValidateLevel ) -> Result<(), SvdError>
Modify an existing DimElement
based on a builder.
Trait Implementations§
source§impl Clone for DimElement
impl Clone for DimElement
source§fn clone(&self) -> DimElement
fn clone(&self) -> DimElement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DimElement
impl Debug for DimElement
source§impl From<DimElement> for DimElementBuilder
impl From<DimElement> for DimElementBuilder
source§fn from(d: DimElement) -> Self
fn from(d: DimElement) -> Self
Converts to this type from the input type.
source§impl PartialEq for DimElement
impl PartialEq for DimElement
source§fn eq(&self, other: &DimElement) -> bool
fn eq(&self, other: &DimElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DimElement
impl StructuralEq for DimElement
impl StructuralPartialEq for DimElement
Auto Trait Implementations§
impl RefUnwindSafe for DimElement
impl Send for DimElement
impl Sync for DimElement
impl Unpin for DimElement
impl UnwindSafe for DimElement
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more