Function encode_type

Source
pub const fn encode_type(pkt_type: u8, pkt_flags: u8) -> u8
Expand description

Encodes packet type to contain both type & flags.

Example:

use mid_net::utils::encode_type;

assert_eq!(encode_type(0, 0b111), 0b111);
assert_eq!(encode_type(1, 0b111), (1 << 3) | 0b111);