Struct ascom_alpaca::api::Devices
source · pub struct Devices { /* private fields */ }Expand description
Devices collection.
This data structure holds devices of arbitrary categories (cameras, telescopes, etc.) and allows to register and access them by their kind and index.
Implementations§
source§impl Devices
impl Devices
source§impl Devices
impl Devices
sourcepub fn iter<DynTrait: ?Sized + RetrieavableDevice>(
&self
) -> impl '_ + Iterator<Item = Arc<DynTrait>>
pub fn iter<DynTrait: ?Sized + RetrieavableDevice>( &self ) -> impl '_ + Iterator<Item = Arc<DynTrait>>
Iterate over all devices of a given type.
sourcepub fn iter_all(&self) -> impl '_ + Iterator<Item = (TypedDevice, usize)>
pub fn iter_all(&self) -> impl '_ + Iterator<Item = (TypedDevice, usize)>
Iterate over all registered devices.
The second element of the tuple is the index of the device within its category (not the whole collection).
Trait Implementations§
source§impl Extend<TypedDevice> for Devices
impl Extend<TypedDevice> for Devices
source§fn extend<T: IntoIterator<Item = TypedDevice>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = TypedDevice>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl FromIterator<TypedDevice> for Devices
impl FromIterator<TypedDevice> for Devices
source§fn from_iter<T: IntoIterator<Item = TypedDevice>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = TypedDevice>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Devices
impl Send for Devices
impl Sync for Devices
impl Unpin for Devices
impl !UnwindSafe for Devices
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