Struct cryptoki::slot::SlotInfo

source ·
pub struct SlotInfo { /* private fields */ }
Expand description

Information about a slot

Implementations§

source§

impl SlotInfo

source

pub fn slot_description(&self) -> &str

String description of the slot

Conformance: This string is maximally 64 bytes (not chars) as UTF-8

source

pub fn manufacturer_id(&self) -> &str

ID of the slot manufacturer

Conformance: This string is maximally 32 bytes (not chars) as UTF-8

source

pub fn token_present(&self) -> bool

True if a token is in the slot (e.g., a device is in the reader).

Conformance: If this slot does not represent a removable device, a token is always considered to be present. That is, slot.removable_device() == false implies slot.token_present() == true.

source

pub fn removable_device(&self) -> bool

True if the reader supports removable devices.

Conformance: For a given slot, this flag never changes

source

pub fn hardware_slot(&self) -> bool

True if the slot is a hardware slot, as opposed to a software slot implementing a “soft token”

source

pub fn hardware_version(&self) -> Version

Version number of the slot’s hardware

source

pub fn firmware_version(&self) -> Version

Version number of the slot’s firmware

Trait Implementations§

source§

impl Clone for SlotInfo

source§

fn clone(&self) -> SlotInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SlotInfo

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<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<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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.