#[repr(C)]pub struct HeaderTagHeader { /* private fields */ }
Expand description
The common header that all header tags share. Specific tags may have
additional fields that depend on the typ
and the size
field.
Implementations§
Source§impl HeaderTagHeader
impl HeaderTagHeader
Sourcepub const fn new(typ: HeaderTagType, flags: HeaderTagFlag, size: u32) -> Self
pub const fn new(typ: HeaderTagType, flags: HeaderTagFlag, size: u32) -> Self
Creates a new header.
Sourcepub const fn typ(&self) -> HeaderTagType
pub const fn typ(&self) -> HeaderTagType
Returns the HeaderTagType
.
Sourcepub const fn flags(&self) -> HeaderTagFlag
pub const fn flags(&self) -> HeaderTagFlag
Returns the HeaderTagFlag
s.
Trait Implementations§
Source§impl Clone for HeaderTagHeader
impl Clone for HeaderTagHeader
Source§fn clone(&self) -> HeaderTagHeader
fn clone(&self) -> HeaderTagHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HeaderTagHeader
impl Debug for HeaderTagHeader
Source§impl Hash for HeaderTagHeader
impl Hash for HeaderTagHeader
Source§impl Header for HeaderTagHeader
impl Header for HeaderTagHeader
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the length of the payload, i.e., the bytes that are additional
to the header. The value is measured in bytes.
Source§fn total_size(&self) -> usize
fn total_size(&self) -> usize
Returns the total size of the struct, thus the size of the header itself
plus
Header::payload_len
.Source§impl Ord for HeaderTagHeader
impl Ord for HeaderTagHeader
Source§fn cmp(&self, other: &HeaderTagHeader) -> Ordering
fn cmp(&self, other: &HeaderTagHeader) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HeaderTagHeader
impl PartialEq for HeaderTagHeader
Source§impl PartialOrd for HeaderTagHeader
impl PartialOrd for HeaderTagHeader
impl Copy for HeaderTagHeader
impl Eq for HeaderTagHeader
impl StructuralPartialEq for HeaderTagHeader
Auto Trait Implementations§
impl Freeze for HeaderTagHeader
impl RefUnwindSafe for HeaderTagHeader
impl Send for HeaderTagHeader
impl Sync for HeaderTagHeader
impl Unpin for HeaderTagHeader
impl UnwindSafe for HeaderTagHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more