Struct hsmtool::util::attribute::AttributeMap
source · pub struct AttributeMap(_);
Implementations§
source§impl AttributeMap
impl AttributeMap
sourcepub fn all() -> &'static [AttributeType]
pub fn all() -> &'static [AttributeType]
Generates a list of all AttributeTypes known to the cryptoki library. This list can be used to retrieve all attributes of an HSM-object to faciltate showing, exporting or modifying objects.
This function only generates the list of known attributes once.
sourcepub fn insert(
&mut self,
key: AttributeType,
value: AttrData
) -> Option<AttrData>
pub fn insert( &mut self, key: AttributeType, value: AttrData ) -> Option<AttrData>
Inserts a key
/value
pair into the mapping, returing the
previous value (if any).
sourcepub fn get(&self, key: &AttributeType) -> Option<&AttrData>
pub fn get(&self, key: &AttributeType) -> Option<&AttrData>
Retrieves an AttrData
value for the given key
.
sourcepub fn to_vec(&self) -> Result<Vec<Attribute>>
pub fn to_vec(&self) -> Result<Vec<Attribute>>
Converts the AttributeMap
to a cryptoki ready list of Attributes
.
sourcepub fn merge(&mut self, other: AttributeMap)
pub fn merge(&mut self, other: AttributeMap)
Merges an other
mapping into self
.
pub fn redact(&mut self, redactions: &HashSet<AttributeType>)
sourcepub fn from_object(session: &Session, object: ObjectHandle) -> Result<Self>
pub fn from_object(session: &Session, object: ObjectHandle) -> Result<Self>
Retrieves an object from the PKCS#11 interface as an AttributeMap
.
Trait Implementations§
source§impl Clone for AttributeMap
impl Clone for AttributeMap
source§fn clone(&self) -> AttributeMap
fn clone(&self) -> AttributeMap
Returns a copy of the value. Read more
1.0.0 · 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 AttributeMap
impl Debug for AttributeMap
source§impl Default for AttributeMap
impl Default for AttributeMap
source§fn default() -> AttributeMap
fn default() -> AttributeMap
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for AttributeMap
impl<'de> Deserialize<'de> for AttributeMap
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&[Attribute]> for AttributeMap
impl From<&[Attribute]> for AttributeMap
source§impl FromStr for AttributeMap
impl FromStr for AttributeMap
source§impl Serialize for AttributeMap
impl Serialize for AttributeMap
source§impl TryFrom<&AttributeMap> for RsaPrivateKey
impl TryFrom<&AttributeMap> for RsaPrivateKey
source§impl TryFrom<&AttributeMap> for RsaPublicKey
impl TryFrom<&AttributeMap> for RsaPublicKey
source§impl TryFrom<&AttributeMap> for SigningKey
impl TryFrom<&AttributeMap> for SigningKey
source§impl TryFrom<&AttributeMap> for VerifyingKey
impl TryFrom<&AttributeMap> for VerifyingKey
source§impl TryFrom<&RsaPrivateKey> for AttributeMap
impl TryFrom<&RsaPrivateKey> for AttributeMap
source§impl TryFrom<&RsaPublicKey> for AttributeMap
impl TryFrom<&RsaPublicKey> for AttributeMap
source§impl TryFrom<&SigningKey<NistP256>> for AttributeMap
impl TryFrom<&SigningKey<NistP256>> for AttributeMap
Auto Trait Implementations§
impl RefUnwindSafe for AttributeMap
impl Send for AttributeMap
impl Sync for AttributeMap
impl Unpin for AttributeMap
impl UnwindSafe for AttributeMap
Blanket Implementations§
§impl<T> Annotate for Twhere
T: Serialize + ?Sized,
impl<T> Annotate for Twhere T: Serialize + ?Sized,
default fn format( &self, _variant: Option<&str>, _field: &MemberId<'_> ) -> Option<Format>
default fn comment( &self, _variant: Option<&str>, _field: &MemberId<'_> ) -> Option<String>
default fn as_annotate(&self) -> Option<&dyn Annotate>
default fn thunk_serialize( &self, serializer: &mut AnnotatedSerializer<'_> ) -> Result<Document, Error>
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