pub struct DeviceBuilder { /* private fields */ }
Expand description

Builder for Device

Implementations§

source§

impl DeviceBuilder

source

pub fn vendor(self, value: Option<String>) -> Self

Set the vendor of the device.

source

pub fn vendor_id(self, value: Option<String>) -> Self

Set the vendor_id of the device.

source

pub fn name(self, value: String) -> Self

Set the name of the device.

source

pub fn series(self, value: Option<String>) -> Self

Set the series of the device.

source

pub fn version(self, value: String) -> Self

Set the version of the device.

source

pub fn description(self, value: String) -> Self

Set the description of the device.

source

pub fn license_text(self, value: Option<String>) -> Self

Set the license_text of the device.

source

pub fn cpu(self, value: Option<Cpu>) -> Self

Set the cpu of the device.

source

pub fn header_system_filename(self, value: Option<String>) -> Self

Set the header_system_filename of the device.

source

pub fn header_definitions_prefix(self, value: Option<String>) -> Self

Set the header_definitions_prefix of the device.

source

pub fn address_unit_bits(self, value: u32) -> Self

Set the address unit bits of the device.

source

pub fn width(self, value: u32) -> Self

Set the width of the device.

source

pub fn default_register_properties(self, value: RegisterProperties) -> Self

Set the default register properties of the device.

source

pub fn peripherals(self, value: Vec<Peripheral>) -> Self

Set the peripherals of the device.

source

pub fn xmlns_xs(self, value: String) -> Self

Set the xmlns_xs version of the device.

source

pub fn no_namespace_schema_location(self, value: String) -> Self

Set the no_namespace_schema_location version of the device.

source

pub fn schema_version(self, value: String) -> Self

Set the schema version of the device.

source

pub fn build(self, lvl: ValidateLevel) -> Result<Device, SvdError>

Validate and build a Device.

Trait Implementations§

source§

impl Clone for DeviceBuilder

source§

fn clone(&self) -> DeviceBuilder

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 DeviceBuilder

source§

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

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

impl Default for DeviceBuilder

source§

fn default() -> DeviceBuilder

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

impl From<Device> for DeviceBuilder

source§

fn from(d: Device) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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> 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,

§

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>,

§

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>,

§

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.