Struct sequoia_openpgp::packet::header::Header [−][src]
pub struct Header { /* fields omitted */ }A packet’s header.
See Section 4.2 of RFC 4880 for details.
Implementations
impl Header[src]
impl Header[src]pub fn new(ctb: CTB, length: BodyLength) -> Self[src]
pub fn new(ctb: CTB, length: BodyLength) -> Self[src]Creates a new header.
pub fn length(&self) -> &BodyLength[src]
pub fn length(&self) -> &BodyLength[src]Returns the header’s length.
pub fn valid(&self, future_compatible: bool) -> Result<()>[src]
pub fn valid(&self, future_compatible: bool) -> Result<()>[src]Checks the header for validity.
A header is consider invalid if:
- The tag is
Tag::Reserved. - The tag is
Tag::UnknownorTag::Privateandfuture_compatibleis false. - The length encoding is invalid for the packet (e.g.,
partial body encoding may not be used for
PKESKpackets) - The lengths are unreasonable for a packet (e.g., a
PKESKorSKESKlarger than 10 KB).
Trait Implementations
impl MarshalInto for Header[src]
impl MarshalInto for Header[src]Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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 Ttype Output = T
type Output = TShould 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 = TThe 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