#[repr(C)]pub struct FrameHeader {
pub version: u8,
pub frame_type: FrameType,
pub flags: u16,
pub header_len: u16,
pub payload_len: u16,
pub hop_limit: u8,
pub next_protocol: NextProtocol,
pub source_link_id: LinkId,
pub destination_link_id: LinkId,
pub flow_id: FlowId,
pub sequence: Sequence,
pub header_tag: [u8; 16],
}Fields§
§version: u8§frame_type: FrameType§flags: u16§header_len: u16§payload_len: u16§hop_limit: u8§next_protocol: NextProtocol§source_link_id: LinkId§destination_link_id: LinkId§flow_id: FlowId§sequence: Sequence§header_tag: [u8; 16]Implementations§
Source§impl FrameHeader
impl FrameHeader
Sourcepub fn new(frame_type: FrameType, next_protocol: NextProtocol) -> Self
pub fn new(frame_type: FrameType, next_protocol: NextProtocol) -> Self
Creates a default FrameHeader.
Sourcepub const fn is_critical(self) -> bool
pub const fn is_critical(self) -> bool
true when critical.
Sourcepub const fn is_fragment(self) -> bool
pub const fn is_fragment(self) -> bool
true when fragment.
Sourcepub fn wire_len(self) -> Result<usize, FrameError>
pub fn wire_len(self) -> Result<usize, FrameError>
Complete on-wire length of this frame (header + payload).
Trait Implementations§
Source§impl Clone for FrameHeader
impl Clone for FrameHeader
impl Copy for FrameHeader
Source§impl Debug for FrameHeader
impl Debug for FrameHeader
impl Eq for FrameHeader
Source§impl PartialEq for FrameHeader
impl PartialEq for FrameHeader
impl StructuralPartialEq for FrameHeader
Auto Trait Implementations§
impl Freeze for FrameHeader
impl RefUnwindSafe for FrameHeader
impl Send for FrameHeader
impl Sync for FrameHeader
impl Unpin for FrameHeader
impl UnsafeUnpin for FrameHeader
impl UnwindSafe for FrameHeader
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more