Enum libcryptsetup_rs::CryptTokenInfo
source · pub enum CryptTokenInfo {
Invalid,
Inactive,
Internal(String),
InternalUnknown(String),
External(String),
ExternalUnknown(String),
}Expand description
Type representing the token status. This type wraps the CRYPT_TOKEN_* values and the optional corresponding token type as a string.
Variants§
Invalid
Token invalid
Inactive
Token is free (empty)
Internal(String)
Active internal token with driver
InternalUnknown(String)
Active internal token (reserved name) with missing token driver
External(String)
Active external (user defined) token with driver
ExternalUnknown(String)
Active external (user defined) token with missing token driver
Implementations§
source§impl CryptTokenInfo
impl CryptTokenInfo
sourcepub fn from_status(
code: c_uint,
type_: Option<String>
) -> Result<Self, LibcryptErr>
pub fn from_status( code: c_uint, type_: Option<String> ) -> Result<Self, LibcryptErr>
Convert a token status code into CryptTokenInfo