pub struct DeviceEnumerator { /* private fields */ }
Expand description
Enumerates PicoDevice
’s
Discovers Pico devices by USB Vendor ID, handles loading the required Pico drivers and enumerates them in parallel.
use pico_enumeration::DeviceEnumerator;
let enumerator = DeviceEnumerator::new();
let results = enumerator.enumerate();
Implementations§
Source§impl DeviceEnumerator
impl DeviceEnumerator
pub fn new() -> Self
Sourcepub fn with_resolution(resolution: Resolution) -> Self
pub fn with_resolution(resolution: Resolution) -> Self
Creates a new DeviceEnumerator
with the supplied resolution
Sourcepub fn enumerate_raw() -> HashMap<Driver, usize>
pub fn enumerate_raw() -> HashMap<Driver, usize>
Enumerates Pico devices via USB Vendor ID. Returns the number of devices
discovered for each Driver
type
Sourcepub fn enumerate(&self) -> Vec<Result<EnumeratedDevice, EnumerationError>>
pub fn enumerate(&self) -> Vec<Result<EnumeratedDevice, EnumerationError>>
Enumerates required drivers and returns a flattened list of results
Trait Implementations§
Source§impl Clone for DeviceEnumerator
impl Clone for DeviceEnumerator
Source§fn clone(&self) -> DeviceEnumerator
fn clone(&self) -> DeviceEnumerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for DeviceEnumerator
impl Default for DeviceEnumerator
Source§fn default() -> DeviceEnumerator
fn default() -> DeviceEnumerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceEnumerator
impl !RefUnwindSafe for DeviceEnumerator
impl Send for DeviceEnumerator
impl Sync for DeviceEnumerator
impl Unpin for DeviceEnumerator
impl !UnwindSafe for DeviceEnumerator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more