pub struct Pkcs11Token {
pub id: i64,
pub module_path: PathBuf,
pub label: String,
pub manufacturer_id: Option<String>,
pub model: Option<String>,
pub serial_number: String,
pub concurrent_requests: i64,
}Fields§
§id: i64The table’s primary key.
module_path: PathBufAbsolute path to the PKCS#11 module to use when accessing the token.
label: StringThe token’s label, useful for identification purposes
manufacturer_id: Option<String>The token’s manufacturer ID, useful for identification purposes
model: Option<String>The token’s model, useful for identification purposes
serial_number: StringThe token’s serial number; used to find the token among all available PKCS#11 slots managed by the given module.
concurrent_requests: i64The number of concurrent signing requests; this translates to the number of open sessions and signing operations. Some tokens have limits. The default, 0, means no limit.
Implementations§
Source§impl Pkcs11Token
impl Pkcs11Token
pub async fn create( conn: &mut SqliteConnection, module_path: PathBuf, label: String, manufacturer_id: Option<String>, model: Option<String>, serial_number: String, concurrent_requests: Option<NonZeroU32>, ) -> Result<Self, Error>
pub async fn get(conn: &mut SqliteConnection, id: i64) -> Result<Self, Error>
pub async fn list(conn: &mut SqliteConnection) -> Result<Vec<Self>, Error>
Trait Implementations§
Source§impl Clone for Pkcs11Token
impl Clone for Pkcs11Token
Source§fn clone(&self) -> Pkcs11Token
fn clone(&self) -> Pkcs11Token
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 Pkcs11Token
impl Debug for Pkcs11Token
Source§impl PartialEq for Pkcs11Token
impl PartialEq for Pkcs11Token
Source§fn eq(&self, other: &Pkcs11Token) -> bool
fn eq(&self, other: &Pkcs11Token) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Pkcs11Token
Auto Trait Implementations§
impl Freeze for Pkcs11Token
impl RefUnwindSafe for Pkcs11Token
impl Send for Pkcs11Token
impl Sync for Pkcs11Token
impl Unpin for Pkcs11Token
impl UnsafeUnpin for Pkcs11Token
impl UnwindSafe for Pkcs11Token
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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