Struct svd_rs::peripheral::PeripheralInfoBuilder
source · pub struct PeripheralInfoBuilder { /* private fields */ }
Expand description
Builder for Peripheral
Implementations§
source§impl PeripheralInfoBuilder
impl PeripheralInfoBuilder
sourcepub fn display_name(self, value: Option<String>) -> Self
pub fn display_name(self, value: Option<String>) -> Self
Set the display name of the peripheral
sourcepub fn description(self, value: Option<String>) -> Self
pub fn description(self, value: Option<String>) -> Self
Set the description of the peripheral
sourcepub fn alternate_peripheral(self, value: Option<String>) -> Self
pub fn alternate_peripheral(self, value: Option<String>) -> Self
Set the alternate peripheral
sourcepub fn group_name(self, value: Option<String>) -> Self
pub fn group_name(self, value: Option<String>) -> Self
Set the group name of the peripheral
sourcepub fn prepend_to_name(self, value: Option<String>) -> Self
pub fn prepend_to_name(self, value: Option<String>) -> Self
Set the prefix for names of all registers of the peripheral
sourcepub fn append_to_name(self, value: Option<String>) -> Self
pub fn append_to_name(self, value: Option<String>) -> Self
Set the suffix for names of all registers of the peripheral
sourcepub fn header_struct_name(self, value: Option<String>) -> Self
pub fn header_struct_name(self, value: Option<String>) -> Self
Set the header struct name of the peripheral
sourcepub fn base_address(self, value: u64) -> Self
pub fn base_address(self, value: u64) -> Self
Set the base address 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 peripheral
sourcepub fn address_block(self, value: Option<Vec<AddressBlock>>) -> Self
pub fn address_block(self, value: Option<Vec<AddressBlock>>) -> Self
Set the address block of the peripheral
sourcepub fn interrupt(self, value: Option<Vec<Interrupt>>) -> Self
pub fn interrupt(self, value: Option<Vec<Interrupt>>) -> Self
Set the interrupts of the peripheral
sourcepub fn registers(self, value: Option<Vec<RegisterCluster>>) -> Self
pub fn registers(self, value: Option<Vec<RegisterCluster>>) -> Self
Set the registers of the peripheral
sourcepub fn derived_from(self, value: Option<String>) -> Self
pub fn derived_from(self, value: Option<String>) -> Self
Set the derived_from attribute of the peripheral
sourcepub fn build(self, lvl: ValidateLevel) -> Result<PeripheralInfo, SvdError>
pub fn build(self, lvl: ValidateLevel) -> Result<PeripheralInfo, SvdError>
Validate and build a PeripheralInfo
.
Trait Implementations§
source§impl Clone for PeripheralInfoBuilder
impl Clone for PeripheralInfoBuilder
source§fn clone(&self) -> PeripheralInfoBuilder
fn clone(&self) -> PeripheralInfoBuilder
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 PeripheralInfoBuilder
impl Debug for PeripheralInfoBuilder
source§impl Default for PeripheralInfoBuilder
impl Default for PeripheralInfoBuilder
source§fn default() -> PeripheralInfoBuilder
fn default() -> PeripheralInfoBuilder
Returns the “default value” for a type. Read more
source§impl From<PeripheralInfo> for PeripheralInfoBuilder
impl From<PeripheralInfo> for PeripheralInfoBuilder
source§fn from(p: PeripheralInfo) -> Self
fn from(p: PeripheralInfo) -> Self
Converts to this type from the input type.
source§impl PartialEq for PeripheralInfoBuilder
impl PartialEq for PeripheralInfoBuilder
source§fn eq(&self, other: &PeripheralInfoBuilder) -> bool
fn eq(&self, other: &PeripheralInfoBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PeripheralInfoBuilder
Auto Trait Implementations§
impl RefUnwindSafe for PeripheralInfoBuilder
impl Send for PeripheralInfoBuilder
impl Sync for PeripheralInfoBuilder
impl Unpin for PeripheralInfoBuilder
impl UnwindSafe for PeripheralInfoBuilder
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