pub struct DeviceSelector {
pub network: Network,
pub fingerprint: Option<Fingerprint>,
pub device_type: Option<DeviceType>,
pub device_path: Option<String>,
pub include_emulators: bool,
pub passphrase: Option<HostPassphrase>,
}Expand description
Filters discovery candidates and optionally selects a wallet by fingerprint.
Fields§
§network: NetworkThe network used when opening a device and running its unlock handshake.
fingerprint: Option<Fingerprint>A wallet fingerprint to query after the unlock handshake; None accepts any.
device_type: Option<DeviceType>A device-family filter; None accepts any family.
device_path: Option<String>An exact discovery-path filter; None accepts any path.
include_emulators: boolWhether discovery should include emulator candidates.
passphrase: Option<HostPassphrase>An optional host passphrase, supported only by Trezor and KeepKey.
Implementations§
Source§impl DeviceSelector
impl DeviceSelector
Sourcepub fn matches(&self, device_type: DeviceType, path: &str) -> bool
pub fn matches(&self, device_type: DeviceType, path: &str) -> bool
Returns whether the family and path match, without probing a fingerprint.
This does not check emulator inclusion, the network, or the passphrase.
Trait Implementations§
Source§impl Clone for DeviceSelector
impl Clone for DeviceSelector
Source§fn clone(&self) -> DeviceSelector
fn clone(&self) -> DeviceSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceSelector
impl Debug for DeviceSelector
Source§impl Default for DeviceSelector
impl Default for DeviceSelector
Source§fn default() -> DeviceSelector
fn default() -> DeviceSelector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceSelector
impl RefUnwindSafe for DeviceSelector
impl Send for DeviceSelector
impl Sync for DeviceSelector
impl Unpin for DeviceSelector
impl UnsafeUnpin for DeviceSelector
impl UnwindSafe for DeviceSelector
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