UuidSelectable

Trait UuidSelectable 

Source
pub trait UuidSelectable: Sized {
    // Required methods
    fn try_uuid(&mut self) -> Result<Uuid, Error>;
    fn list() -> Vec<Self>;

    // Provided method
    fn having(uuid: Uuid) -> Result<Self, Error> { ... }
}

Required Methods§

Source

fn try_uuid(&mut self) -> Result<Uuid, Error>

Returns the UUID associated with the thing, if it has a UUID.

Note: This may modify the thing as it might need to communicate with it.

Source

fn list() -> Vec<Self>

Returns all of the available things.

Provided Methods§

Source

fn having(uuid: Uuid) -> Result<Self, Error>

Returns the thing with the given UUID.

Default implementation; replace for better error messages.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl UuidSelectable for solo2::device::Device

Source§

impl UuidSelectable for solo2::device::ctap::Device

Source§

impl UuidSelectable for solo2::device::pcsc::Device

Source§

impl UuidSelectable for Solo2

Source§

impl UuidSelectable for Bootloader