[−][src]Struct sequoia_openpgp::packet::signature::subpacket::NotationDataFlags
Flags for the Notation Data subpacket.
Implementations
impl NotationDataFlags
[src]
pub fn new<B: AsRef<[u8]>>(bits: B) -> Result<Self>
[src]
Creates a new instance from bits
.
pub fn empty() -> Self
[src]
Returns an empty key server preference set.
pub fn get(&self, bit: usize) -> bool
[src]
Returns whether the specified notation data flag is set.
Examples
use sequoia_openpgp as openpgp; use openpgp::packet::signature::subpacket::NotationDataFlags; // Notation Data flags 0 and 2. let ndf = NotationDataFlags::new(&[5, 0, 0, 0])?; assert!(ndf.get(0)); assert!(! ndf.get(1)); assert!(ndf.get(2)); assert!(! ndf.get(3)); assert!(! ndf.get(8)); assert!(! ndf.get(80));
pub fn set(self, bit: usize) -> Result<Self>
[src]
Sets the specified notation data flag.
Examples
use sequoia_openpgp as openpgp; use openpgp::packet::signature::subpacket::NotationDataFlags; let ndf = NotationDataFlags::empty().set(0)?.set(2)?; assert!(ndf.get(0)); assert!(! ndf.get(1)); assert!(ndf.get(2)); assert!(! ndf.get(3));
pub fn clear(self, bit: usize) -> Result<Self>
[src]
Clears the specified notation data flag.
Examples
use sequoia_openpgp as openpgp; use openpgp::packet::signature::subpacket::NotationDataFlags; let ndf = NotationDataFlags::empty().set(0)?.set(2)?.clear(2)?; assert!(ndf.get(0)); assert!(! ndf.get(1)); assert!(! ndf.get(2)); assert!(! ndf.get(3));
pub fn human_readable(&self) -> bool
[src]
Returns whether the value is human-readable.
pub fn set_human_readable(self) -> Self
[src]
Asserts that the value is human-readable.
pub fn clear_human_readable(self) -> Self
[src]
Clear the assertion that the value is human-readable.
Trait Implementations
impl Clone for NotationDataFlags
[src]
fn clone(&self) -> NotationDataFlags
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NotationDataFlags
[src]
impl Eq for NotationDataFlags
[src]
impl Hash for NotationDataFlags
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<NotationDataFlags> for NotationDataFlags
[src]
fn eq(&self, other: &NotationDataFlags) -> bool
[src]
fn ne(&self, other: &NotationDataFlags) -> bool
[src]
impl StructuralEq for NotationDataFlags
[src]
impl StructuralPartialEq for NotationDataFlags
[src]
Auto Trait Implementations
impl RefUnwindSafe for NotationDataFlags
impl Send for NotationDataFlags
impl Sync for NotationDataFlags
impl Unpin for NotationDataFlags
impl UnwindSafe for NotationDataFlags
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,