pub struct DeviceBuilder<K: Hash + Eq> { /* private fields */ }Implementations§
Source§impl<K: Hash + Eq> DeviceBuilder<K>
Auto-generated by derive_getters::Getters.
impl<K: Hash + Eq> DeviceBuilder<K>
Auto-generated by derive_getters::Getters.
Sourcepub fn channel_configs(&self) -> &HashMap<K, ChannelConfig>
pub fn channel_configs(&self) -> &HashMap<K, ChannelConfig>
Get field configs from instance of DeviceBuilder.
Source§impl<K: Hash + Eq + Default> DeviceBuilder<K>
impl<K: Hash + Eq + Default> DeviceBuilder<K>
pub fn new() -> Self
pub fn add_config(&mut self, channel: K, 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<Channel = K>>(self) -> Result<T, Error>
Trait Implementations§
Source§impl<K: Default + Hash + Eq> Default for DeviceBuilder<K>
impl<K: Default + Hash + Eq> Default for DeviceBuilder<K>
Source§fn default() -> DeviceBuilder<K>
fn default() -> DeviceBuilder<K>
Returns the “default value” for a type. Read more
impl<K: Hash + Eq> Send for DeviceBuilder<K>
impl<K: Hash + Eq> Sync for DeviceBuilder<K>
Auto Trait Implementations§
impl<K> Freeze for DeviceBuilder<K>
impl<K> !RefUnwindSafe for DeviceBuilder<K>
impl<K> Unpin for DeviceBuilder<K>where
K: Unpin,
impl<K> !UnwindSafe for DeviceBuilder<K>
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