Struct sequoia_openpgp::packet::signature::subpacket::NotationDataFlags [−][src]
pub struct NotationDataFlags(_);
Flags for the Notation Data subpacket.
Implementations
impl NotationDataFlags
[src]
impl NotationDataFlags
[src]pub fn get(&self, bit: usize) -> bool
[src]
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]
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]
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]
pub fn human_readable(&self) -> bool
[src]Returns whether the value is human-readable.
pub fn set_human_readable(self) -> Self
[src]
pub fn set_human_readable(self) -> Self
[src]Asserts that the value is human-readable.
pub fn clear_human_readable(self) -> Self
[src]
pub fn clear_human_readable(self) -> Self
[src]Clear the assertion that the value is human-readable.
Trait Implementations
impl Clone for NotationDataFlags
[src]
impl Clone for NotationDataFlags
[src]fn clone(&self) -> NotationDataFlags
[src]
fn clone(&self) -> NotationDataFlags
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for NotationDataFlags
[src]
impl Debug for NotationDataFlags
[src]impl Hash for NotationDataFlags
[src]
impl Hash for NotationDataFlags
[src]impl Ord for NotationDataFlags
[src]
impl Ord for NotationDataFlags
[src]impl PartialEq<NotationDataFlags> for NotationDataFlags
[src]
impl PartialEq<NotationDataFlags> for NotationDataFlags
[src]fn eq(&self, other: &NotationDataFlags) -> bool
[src]
fn eq(&self, other: &NotationDataFlags) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &NotationDataFlags) -> bool
[src]
fn ne(&self, other: &NotationDataFlags) -> bool
[src]This method tests for !=
.
impl PartialOrd<NotationDataFlags> for NotationDataFlags
[src]
impl PartialOrd<NotationDataFlags> for NotationDataFlags
[src]fn partial_cmp(&self, other: &NotationDataFlags) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &NotationDataFlags) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for NotationDataFlags
[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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more