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
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
sourceimpl 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
sourceimpl Clone for DimElement
impl Clone for DimElement
sourcefn clone(&self) -> DimElement
fn clone(&self) -> DimElement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DimElement
impl Debug for DimElement
sourceimpl From<DimElement> for DimElementBuilder
impl From<DimElement> for DimElementBuilder
sourcefn from(d: DimElement) -> Self
fn from(d: DimElement) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<DimElement> for DimElement
impl PartialEq<DimElement> for DimElement
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &DimElement) -> bool
fn ne(&self, other: &DimElement) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more