Skip to main content

Solo2

Struct Solo2 

Source
pub struct Solo2 { /* private fields */ }
Expand description

A SoloKeys Solo 2 device, in regular mode.

From an inventory perspective, the core identifier is a UUID (16 bytes / 128 bits).

From an interface perspective, either the CTAP or PCSC transport must be available. Therefore, it is an invariant that at least one is interface, and the device itself implements Transport.

Implementations§

Source§

impl Solo2

Source

pub fn transport_preference() -> TransportPreference

Source

pub fn prefer_ctap()

Source

pub fn prefer_pcsc()

Source

pub fn into_lpc55(self) -> Result<Lpc55>

NB: Requires user tap

Source§

impl Solo2

Source

pub fn uuid(&self) -> Uuid

UUID of device.

Source

pub fn version(&self) -> Version

Firmware version on device.

Source

pub fn as_ctap(&self) -> Option<&Device>

Source

pub fn as_ctap_mut(&mut self) -> Option<&mut Device>

Source

pub fn as_pcsc(&self) -> Option<&Device>

Source

pub fn as_pcsc_mut(&mut self) -> Option<&mut Device>

Trait Implementations§

Source§

impl Debug for Solo2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Solo2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Solo2> for Device

Source§

fn from(solo2: Solo2) -> Device

Converts to this type from the input type.
Source§

impl Transport for Solo2

Source§

fn call(&mut self, instruction: u8, data: &[u8]) -> Result<Vec<u8>>

The minimal higher-level interface to a transport.
Source§

fn call_iso( &mut self, class: u8, instruction: u8, p1: u8, p2: u8, data: &[u8], ) -> Result<Vec<u8>>

Call in the funny ISO 7816 fashion with three extra parameters. Note that only the PCSC transport implements this, not the CTAP transport.
Source§

fn select(&mut self, aid: Vec<u8>) -> Result<()>

Source§

fn instruct(&mut self, instruction: u8) -> Result<Vec<u8>>

Shortcut for when no data is needed.
Source§

impl TryFrom<Device> for Solo2

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(device: Device) -> Result<Solo2>

Performs the conversion.
Source§

impl TryFrom<Device> for Solo2

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(device: Device) -> Result<Solo2>

Performs the conversion.
Source§

impl UuidSelectable for Solo2

Source§

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

Returns the UUID associated with the thing, if it has a UUID. Read more
Source§

fn list() -> Vec<Self>

Returns all of the available things.
Source§

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

Returns the thing with the given UUID. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Solo2

§

impl !Sync for Solo2

§

impl !UnwindSafe for Solo2

§

impl Freeze for Solo2

§

impl Send for Solo2

§

impl Unpin for Solo2

§

impl UnsafeUnpin for Solo2

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V