[][src]Trait spectrusty_core::bus::NamedBusDevice

pub trait NamedBusDevice<T>: Display + BusDevice<Timestamp = T, NextDevice = NullDevice<T>> { }

A trait for dynamic bus devices, which currently includes methods from Display and BusDevice. Devices implementing this trait can be used with a DynamicBus.

Implemented for all types that implement dependent traits.

Implementations

impl<T: 'static> dyn NamedBusDevice<T>[src]

pub fn downcast<D: 'static>(
    self: Box<Self>
) -> Result<Box<D>, Box<dyn NamedBusDevice<T>>> where
    D: NamedBusDevice<T>, 
[src]

Attempts to downcast the box to a concrete type.

impl<T: 'static> dyn NamedBusDevice<T> + 'static[src]

pub fn is<D: NamedBusDevice<T> + 'static>(&self) -> bool[src]

Returns true if the boxed type is the same as D

pub fn downcast_ref<D: NamedBusDevice<T> + 'static>(&self) -> Option<&D>[src]

Returns some reference to the boxed value if it is of type D, or None if it isn't.

pub fn downcast_mut<D: NamedBusDevice<T> + 'static>(&mut self) -> Option<&mut D>[src]

Returns some mutable reference to the boxed value if it is of type D, or None if it isn't.

Implementors

impl<T, D> NamedBusDevice<T> for D where
    D: Display + BusDevice<Timestamp = T, NextDevice = NullDevice<T>>, 
[src]

Loading content...