Struct psa_crypto::types::key::UsageFlags
source · [−]pub struct UsageFlags { /* private fields */ }Expand description
Definition of the usage flags. They encode what kind of operations are permitted on the key.
Implementations
sourceimpl UsageFlags
impl UsageFlags
sourcepub fn set_export(&mut self) -> &mut Self
pub fn set_export(&mut self) -> &mut Self
Setter for the export flag
sourcepub fn set_encrypt(&mut self) -> &mut Self
pub fn set_encrypt(&mut self) -> &mut Self
Setter for the encrypt flag
sourcepub fn set_decrypt(&mut self) -> &mut Self
pub fn set_decrypt(&mut self) -> &mut Self
Setter for the decrypt flag
sourcepub fn set_sign_hash(&mut self) -> &mut Self
pub fn set_sign_hash(&mut self) -> &mut Self
Setter for the sign_hash flag (also sets the sign_message flag)
sourcepub fn set_sign_message(&mut self) -> &mut Self
pub fn set_sign_message(&mut self) -> &mut Self
Setter for the sign_message flag
sourcepub fn sign_message(&self) -> bool
pub fn sign_message(&self) -> bool
Getter for the sign_message flag
sourcepub fn set_verify_hash(&mut self) -> &mut Self
pub fn set_verify_hash(&mut self) -> &mut Self
Setter for the verify_hash flag (also sets the varify_message flag)
sourcepub fn verify_hash(&self) -> bool
pub fn verify_hash(&self) -> bool
Getter for the verify_hash flag
sourcepub fn set_verify_message(&mut self) -> &mut Self
pub fn set_verify_message(&mut self) -> &mut Self
Setter for the verify_message flag
sourcepub fn verify_message(&self) -> bool
pub fn verify_message(&self) -> bool
Getter for the verify_message flag
sourcepub fn set_derive(&mut self) -> &mut Self
pub fn set_derive(&mut self) -> &mut Self
Setter for the derive flag
Trait Implementations
sourceimpl Clone for UsageFlags
impl Clone for UsageFlags
sourcefn clone(&self) -> UsageFlags
fn clone(&self) -> UsageFlags
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for UsageFlags
impl Debug for UsageFlags
sourceimpl Default for UsageFlags
impl Default for UsageFlags
sourcefn default() -> UsageFlags
fn default() -> UsageFlags
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for UsageFlags
impl<'de> Deserialize<'de> for UsageFlags
sourcefn 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
sourceimpl From<UsageFlags> for psa_key_usage_t
impl From<UsageFlags> for psa_key_usage_t
sourcefn from(flags: UsageFlags) -> Self
fn from(flags: UsageFlags) -> Self
Converts to this type from the input type.
sourceimpl From<u32> for UsageFlags
impl From<u32> for UsageFlags
sourcefn from(flags: psa_key_usage_t) -> Self
fn from(flags: psa_key_usage_t) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<UsageFlags> for UsageFlags
impl PartialEq<UsageFlags> for UsageFlags
sourcefn eq(&self, other: &UsageFlags) -> bool
fn eq(&self, other: &UsageFlags) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl Serialize for UsageFlags
impl Serialize for UsageFlags
sourceimpl Zeroize for UsageFlags
impl Zeroize for UsageFlags
impl Copy for UsageFlags
impl Eq for UsageFlags
impl StructuralEq for UsageFlags
impl StructuralPartialEq for UsageFlags
Auto Trait Implementations
impl RefUnwindSafe for UsageFlags
impl Send for UsageFlags
impl Sync for UsageFlags
impl Unpin for UsageFlags
impl UnwindSafe for UsageFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more