[−][src]Struct sequoia_openpgp::cert::CertValidator
Used to help validate that a packet sequence is a valid Cert.
Methods
impl CertValidator
[src]
pub fn new() -> Self
[src]
Instantiates a new CertValidator
.
pub fn is_cert(&self) -> bool
[src]
Returns whether the packet sequence is a valid Cert.
Note: a CertValidator
will only return this after
CertValidator::finish
has been called.
pub fn is_cert_prefix(&self) -> bool
[src]
Returns whether the packet sequence forms a valid Cert prefix.
Note: a CertValidator
will only return this before
CertValidator::finish
has been called.
pub fn is_err(&self) -> bool
[src]
Returns whether the packet sequence is definitely not a valid Cert.
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
CertValidity::CertPrefix
.
pub fn check(&self) -> CertValidity
[src]
Returns whether the token stream corresponds to a valid Cert.
This returns a tri-state: if the packet sequence is a valid
Cert, it returns CertValidity::Cert
, if the packet sequence
is invalid, then it returns CertValidity::Error
. If the
packet sequence that has been processed so far is a valid
prefix, then it returns CertValidity::CertPrefix
.
Note: if CertValidator::finish()
hasn't been called, then
this function will only ever return either
CertValidity::CertPrefix
or CertValidity::Error
. Once
CertValidity::finish()
has been called, then it will only
return either CertValidity::Cert
or CertValidity::Error
.
Trait Implementations
impl Debug for CertValidator
[src]
impl Default for CertValidator
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CertValidator
impl Send for CertValidator
impl Sync for CertValidator
impl Unpin for CertValidator
impl !UnwindSafe for CertValidator
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>,