pub struct DeviceBuilder { /* private fields */ }Implementations§
Source§impl DeviceBuilder
Auto-generated by derive_getters::Getters.
impl DeviceBuilder
Auto-generated by derive_getters::Getters.
Sourcepub fn channel_configs(&self) -> &HashMap<String, ChannelConfig>
pub fn channel_configs(&self) -> &HashMap<String, ChannelConfig>
Get field configs from instance of DeviceBuilder.
Source§impl DeviceBuilder
impl DeviceBuilder
pub fn new() -> Self
pub fn set_channel<S: Into<String>>(&mut self, channel: S) -> &mut Self
pub fn add_config<S: Into<String>>( &mut self, channel: S, cfg: ChannelConfig, ) -> &mut Self
pub fn add_other(&mut self, name: &str, cfg: Box<dyn Any>) -> &mut Self
pub fn get_other<T: Clone + 'static>( &self, name: &str, ) -> Result<Option<T>, Error>
pub fn build<T: Device>(self) -> Result<T, Error>
Trait Implementations§
Source§impl Debug for DeviceBuilder
impl Debug for DeviceBuilder
Source§impl Default for DeviceBuilder
impl Default for DeviceBuilder
Source§fn default() -> DeviceBuilder
fn default() -> DeviceBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceBuilder
impl !RefUnwindSafe for DeviceBuilder
impl !Send for DeviceBuilder
impl !Sync for DeviceBuilder
impl Unpin for DeviceBuilder
impl !UnwindSafe for DeviceBuilder
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