[][src]Struct sequoia_openpgp::types::KeyFlags

pub struct KeyFlags { /* fields omitted */ }

Describes how a key may be used, and stores additional information.

A note on equality

PartialEq is implements semantic equality, i.e. it ignores padding.

Implementations

impl KeyFlags[src]

pub fn new<B: AsRef<[u8]>>(bits: B) -> Self[src]

Creates a new instance from bits.

pub fn empty() -> Self[src]

Returns a new KeyFlags with all capabilities disabled.

pub fn for_certification(&self) -> bool[src]

This key may be used to certify other keys.

pub fn set_certification(self, v: bool) -> Self[src]

Sets whether or not this key may be used to certify other keys.

pub fn for_signing(&self) -> bool[src]

This key may be used to sign data.

pub fn set_signing(self, v: bool) -> Self[src]

Sets whether or not this key may be used to sign data.

pub fn for_transport_encryption(&self) -> bool[src]

This key may be used to encrypt communications.

pub fn set_transport_encryption(self, v: bool) -> Self[src]

Sets whether or not this key may be used to encrypt communications.

pub fn for_storage_encryption(&self) -> bool[src]

This key may be used to encrypt storage.

pub fn set_storage_encryption(self, v: bool) -> Self[src]

Sets whether or not this key may be used to encrypt storage.

pub fn for_authentication(&self) -> bool[src]

This key may be used for authentication.

pub fn set_authentication(self, v: bool) -> Self[src]

Sets whether or not this key may be used for authentication.

pub fn is_split_key(&self) -> bool[src]

The private component of this key may have been split using a secret-sharing mechanism.

pub fn set_split_key(self, v: bool) -> Self[src]

Sets whether or not the private component of this key may have been split using a secret-sharing mechanism.

pub fn is_group_key(&self) -> bool[src]

The private component of this key may be in possession of more than one person.

pub fn set_group_key(self, v: bool) -> Self[src]

Sets whether or not the private component of this key may be in possession of more than one person.

pub fn is_empty(&self) -> bool[src]

Returns whether no flags are set.

Trait Implementations

impl Arbitrary for KeyFlags[src]

impl<'_> BitAnd<&'_ KeyFlags> for &'_ KeyFlags[src]

type Output = KeyFlags

The resulting type after applying the & operator.

impl<'_> BitOr<&'_ KeyFlags> for &'_ KeyFlags[src]

type Output = KeyFlags

The resulting type after applying the | operator.

impl Clone for KeyFlags[src]

impl Debug for KeyFlags[src]

impl Default for KeyFlags[src]

impl Eq for KeyFlags[src]

impl Hash for KeyFlags[src]

impl PartialEq<KeyFlags> for KeyFlags[src]

impl PartialOrd<KeyFlags> for KeyFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,