pub struct AttributeMap(/* private fields */);
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 Freeze for AttributeMap
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 T
impl<T> Annotate for T
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