[−][src]Struct sequoia_openpgp::cert::KeyringValidator
Used to help validate that a packet sequence is a valid key ring.
Methods
impl KeyringValidator
[src]
pub fn new() -> Self
[src]
Instantiates a new KeyringValidator
.
pub fn is_keyring(&self) -> bool
[src]
Returns whether the packet sequence is a valid keyring.
Note: a KeyringValidator
will only return this after
KeyringValidator::finish
has been called.
pub fn is_keyring_prefix(&self) -> bool
[src]
Returns whether the packet sequence forms a valid keyring prefix.
Note: a KeyringValidator
will only return this before
KeyringValidator::finish
has been called.
pub fn is_err(&self) -> bool
[src]
Returns whether the packet sequence is definitely not a valid keyring.
pub fn push_token(&mut self, token: Token)
[src]
Add the token token
to the token stream.
pub fn push(&mut self, tag: Tag)
[src]
Add a packet of type tag
to the token stream.
pub fn finish(&mut self)
[src]
Note that the entire message has been seen.
This function may only be called once.
Once called, this function will no longer return
KeyringValidity::KeyringPrefix
.
pub fn check(&self) -> KeyringValidity
[src]
Returns whether the token stream corresponds to a valid keyring.
This returns a tri-state: if the packet sequence is a valid Keyring, it returns KeyringValidity::Keyring, if the packet sequence is invalid, then it returns KeyringValidity::Error. If the packet sequence could be valid, then it returns KeyringValidity::KeyringPrefix.
Note: if KeyringValidator::finish() hasn't been called, then this function will only ever return either KeyringValidity::KeyringPrefix or KeyringValidity::Error. Once KeyringValidity::finish() has been called, then only KeyringValidity::Keyring or KeyringValidity::Bad will be called.
Trait Implementations
impl Debug for KeyringValidator
[src]
impl Default for KeyringValidator
[src]
Auto Trait Implementations
impl !RefUnwindSafe for KeyringValidator
impl Send for KeyringValidator
impl Sync for KeyringValidator
impl Unpin for KeyringValidator
impl !UnwindSafe for KeyringValidator
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,