Struct svd_rs::cluster::ClusterInfoBuilder
source · pub struct ClusterInfoBuilder { /* private fields */ }
Expand description
Builder for ClusterInfo
Implementations§
source§impl ClusterInfoBuilder
impl ClusterInfoBuilder
sourcepub fn description(self, value: Option<String>) -> Self
pub fn description(self, value: Option<String>) -> Self
Set the description of the cluster.
sourcepub fn alternate_cluster(self, value: Option<String>) -> Self
pub fn alternate_cluster(self, value: Option<String>) -> Self
Set the alternate cluster.
sourcepub fn header_struct_name(self, value: Option<String>) -> Self
pub fn header_struct_name(self, value: Option<String>) -> Self
Set the struct type name of the cluster. If not specified, the name of the cluster should be used.
sourcepub fn address_offset(self, value: u32) -> Self
pub fn address_offset(self, value: u32) -> Self
Set the address_offset of the cluster, relative to the baseAddress
of the peripheral.
sourcepub fn default_register_properties(self, value: RegisterProperties) -> Self
pub fn default_register_properties(self, value: RegisterProperties) -> Self
Set the default_register_properties of the cluster.
sourcepub fn children(self, value: Vec<RegisterCluster>) -> Self
pub fn children(self, value: Vec<RegisterCluster>) -> Self
Set the children of the cluster.
sourcepub fn derived_from(self, value: Option<String>) -> Self
pub fn derived_from(self, value: Option<String>) -> Self
Set the derived_from of the cluster.
sourcepub fn build(self, lvl: ValidateLevel) -> Result<ClusterInfo, SvdError>
pub fn build(self, lvl: ValidateLevel) -> Result<ClusterInfo, SvdError>
Validate and build a ClusterInfo
.
Trait Implementations§
source§impl Clone for ClusterInfoBuilder
impl Clone for ClusterInfoBuilder
source§fn clone(&self) -> ClusterInfoBuilder
fn clone(&self) -> ClusterInfoBuilder
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 ClusterInfoBuilder
impl Debug for ClusterInfoBuilder
source§impl Default for ClusterInfoBuilder
impl Default for ClusterInfoBuilder
source§fn default() -> ClusterInfoBuilder
fn default() -> ClusterInfoBuilder
Returns the “default value” for a type. Read more
source§impl From<ClusterInfo> for ClusterInfoBuilder
impl From<ClusterInfo> for ClusterInfoBuilder
source§fn from(c: ClusterInfo) -> Self
fn from(c: ClusterInfo) -> Self
Converts to this type from the input type.
source§impl PartialEq for ClusterInfoBuilder
impl PartialEq for ClusterInfoBuilder
source§fn eq(&self, other: &ClusterInfoBuilder) -> bool
fn eq(&self, other: &ClusterInfoBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ClusterInfoBuilder
Auto Trait Implementations§
impl RefUnwindSafe for ClusterInfoBuilder
impl Send for ClusterInfoBuilder
impl Sync for ClusterInfoBuilder
impl Unpin for ClusterInfoBuilder
impl UnwindSafe for ClusterInfoBuilder
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