filament-packet · header
Source declarations, signatures and documentation for header.
Read the current implementation boundaries before integration. This reference reproduces declarations; it omits source comments whose examples or readiness claims have not been verified.
Source: sigil/weave/filament/filament-packet/src/header.rs. SHA-256: 75003f2037c3adfe5b6b73aa871799393fd3b0b056d6ebdd99d58c8db10cd4a0.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
header::Header
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Header {
/// Whether IFAC authentication is included.
pub ifac_flag: bool,
/// Header type (Header1 = 16 bytes, Header2 = 32 bytes).
pub header_type: HeaderType,
/// Whether context byte is included.
pub context_flag: bool,
/// Propagation type (Broadcast or Transport).
pub propagation_type: PropagationType,
/// Destination type.
pub destination_type: DestinationType,
/// Packet type.
pub packet_type: PacketType,
/// Hop count (0-255, decremented by transport nodes).
pub hop_count: u8
}Source line: 24.
header::Header::new
#[inline]
pub const fn new(packet_type: PacketType, destination_type: DestinationType) -> Self;Source line: 50.
header::Header::with_ifac
#[inline]
pub const fn with_ifac(mut self, enabled: bool) -> Self;Source line: 64.
header::Header::with_header_type
#[inline]
pub const fn with_header_type(mut self, header_type: HeaderType) -> Self;Source line: 71.
header::Header::with_context
#[inline]
pub const fn with_context(mut self, enabled: bool) -> Self;Source line: 78.
header::Header::with_propagation
#[inline]
pub const fn with_propagation(mut self, propagation: PropagationType) -> Self;Source line: 85.
header::Header::with_hop_count
#[inline]
pub const fn with_hop_count(mut self, hop_count: u8) -> Self;Source line: 92.
header::Header::encode
#[inline]
pub const fn encode(&self) -> [u8; HEADER_SIZE];Source line: 101.
header::Header::decode
#[inline]
pub fn decode(bytes: &[u8]) -> Result<Self>;Source line: 125.
header::Header::address_size
#[inline]
pub const fn address_size(&self) -> usize;Source line: 155.
header::Header::min_packet_size
#[inline]
pub const fn min_packet_size(&self) -> usize;Source line: 161.
header::Header::decrement_hop_count
#[inline]
pub fn decrement_hop_count(&mut self) -> Result<()>;Source line: 180.
header::Header::is_hop_count_expired
#[inline]
pub const fn is_hop_count_expired(&self) -> bool;Source line: 190.