pub struct PK11URIMapping<'a> { /* private fields */ }Expand description
Encapsulates the result of successfully parsing a PKCS#11 URI.
Implementations§
Source§impl<'a> PK11URIMapping<'a>
impl<'a> PK11URIMapping<'a>
Sourcepub fn token(&self) -> Option<&str>
pub fn token(&self) -> Option<&str>
Retrieve the value of the “token” path attribute if one was parsed.
Sourcepub fn manufacturer(&self) -> Option<&str>
pub fn manufacturer(&self) -> Option<&str>
Retrieve the value of the “manufacturer” path attribute if one was parsed.
Sourcepub fn serial(&self) -> Option<&str>
pub fn serial(&self) -> Option<&str>
Retrieve the value of the “serial” path attribute if one was parsed.
Sourcepub fn model(&self) -> Option<&str>
pub fn model(&self) -> Option<&str>
Retrieve the value of the “model” path attribute if one was parsed.
Sourcepub fn library_manufacturer(&self) -> Option<&str>
pub fn library_manufacturer(&self) -> Option<&str>
Retrieve the value of the “library-manufacturer” path attribute if one was parsed.
Sourcepub fn library_version(&self) -> Option<&str>
pub fn library_version(&self) -> Option<&str>
Retrieve the value of the “library-version” path attribute if one was parsed.
Sourcepub fn library_description(&self) -> Option<&str>
pub fn library_description(&self) -> Option<&str>
Retrieve the value of the “library-description” path attribute if one was parsed.
Sourcepub fn object(&self) -> Option<&str>
pub fn object(&self) -> Option<&str>
Retrieve the value of the “object” path attribute if one was parsed.
Sourcepub fn type(&self) -> Option<&str>
pub fn type(&self) -> Option<&str>
Retrieve the value of the “type” path attribute if one was parsed.
Sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
Retrieve the value of the “id” path attribute if one was parsed.
Sourcepub fn slot_description(&self) -> Option<&str>
pub fn slot_description(&self) -> Option<&str>
Retrieve the value of the “slot-description” path attribute if one was parsed.
Sourcepub fn slot_manufacturer(&self) -> Option<&str>
pub fn slot_manufacturer(&self) -> Option<&str>
Retrieve the value of the “slot-manufacturer” path attribute if one was parsed.
Sourcepub fn slot_id(&self) -> Option<&str>
pub fn slot_id(&self) -> Option<&str>
Retrieve the value of the “slot-id” path attribute if one was parsed.
Sourcepub fn pin_source(&self) -> Option<&str>
pub fn pin_source(&self) -> Option<&str>
Retrieve the value of the “pin-source” query attribute if one was parsed.
Sourcepub fn pin_value(&self) -> Option<&str>
pub fn pin_value(&self) -> Option<&str>
Retrieve the value of the “pin-value” query attribute if one was parsed.
Sourcepub fn module_name(&self) -> Option<&str>
pub fn module_name(&self) -> Option<&str>
Retrieve the value of the “module-name” query attribute if one was parsed.
Sourcepub fn module_path(&self) -> Option<&str>
pub fn module_path(&self) -> Option<&str>
Retrieve the value of the “module-path” query attribute if one was parsed.
Sourcepub fn vendor(&self, vendor_attr: &str) -> Option<&Vec<&'a str>>
pub fn vendor(&self, vendor_attr: &str) -> Option<&Vec<&'a str>>
Retrieve the &Vec<&'a str> values for the vendor-specific vendor_attr if parsed.
§Examples
// `v-attr` is an example "vendor-specific" attribute:
let pk11_uri = "pkcs11:v-attr=val1?v-attr=val2&v-attr=val3";
let mapping = pk11_uri_parser::parse(pk11_uri).expect("valid mapping");
// Retrieve the `v-attr` values using the `vendor` method:
let vendor_attrs = mapping.vendor("v-attr").expect("v-attr vendor-specific attribute values");
for v_attr_val in vendor_attrs {
println!("{v_attr_val}")
}prints
val1
val2
val3Trait Implementations§
Source§impl<'a> Clone for PK11URIMapping<'a>
impl<'a> Clone for PK11URIMapping<'a>
Source§fn clone(&self) -> PK11URIMapping<'a>
fn clone(&self) -> PK11URIMapping<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more