Struct netsim_embed::quic::ResetStreamPacket  
source · pub struct ResetStreamPacket<'p> { /* private fields */ }Expand description
A structure enabling manipulation of on the wire packets
Implementations§
source§impl<'a> ResetStreamPacket<'a>
 
impl<'a> ResetStreamPacket<'a>
sourcepub fn new<'p>(packet: &'p [u8]) -> Option<ResetStreamPacket<'p>>
 
pub fn new<'p>(packet: &'p [u8]) -> Option<ResetStreamPacket<'p>>
Constructs a new #name. If the provided buffer is less than the minimum required packet size, this will return None.
sourcepub fn owned(packet: Vec<u8, Global>) -> Option<ResetStreamPacket<'static>>
 
pub fn owned(packet: Vec<u8, Global>) -> Option<ResetStreamPacket<'static>>
Constructs a new #name. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the #name will own its own data and the underlying buffer will be dropped when the #name is.
sourcepub fn to_immutable<'p>(&'p self) -> ResetStreamPacket<'p>
 
pub fn to_immutable<'p>(&'p self) -> ResetStreamPacket<'p>
Maps from a #name to a #imm_name
sourcepub fn consume_to_immutable(self) -> ResetStreamPacket<'a>
 
pub fn consume_to_immutable(self) -> ResetStreamPacket<'a>
Maps from a #name to a #imm_name while consuming the source
sourcepub const fn minimum_packet_size() -> usize
 
pub const fn minimum_packet_size() -> usize
The minimum size (in bytes) a packet of this type can be. It’s based on the total size of the fixed-size fields.
sourcepub fn packet_size(_packet: &ResetStream) -> usize
 
pub fn packet_size(_packet: &ResetStream) -> usize
The size (in bytes) of a #base_name instance when converted into a byte-array
sourcepub fn get_stream_id_raw(&self) -> &[u8] ⓘ
 
pub fn get_stream_id_raw(&self) -> &[u8] ⓘ
Get the raw &u8 value of the {name} field, without copying
sourcepub fn get_stream_id(&self) -> Vec<u8, Global>
 
pub fn get_stream_id(&self) -> Vec<u8, Global>
Get the value of the {name} field (copies contents)
sourcepub fn get_application_protocol_error_code_raw(&self) -> &[u8] ⓘ
 
pub fn get_application_protocol_error_code_raw(&self) -> &[u8] ⓘ
Get the raw &u8 value of the {name} field, without copying
sourcepub fn get_application_protocol_error_code(&self) -> Vec<u8, Global>
 
pub fn get_application_protocol_error_code(&self) -> Vec<u8, Global>
Get the value of the {name} field (copies contents)
sourcepub fn get_final_size_raw(&self) -> &[u8] ⓘ
 
pub fn get_final_size_raw(&self) -> &[u8] ⓘ
Get the raw &u8 value of the {name} field, without copying
sourcepub fn get_final_size(&self) -> Vec<u8, Global>
 
pub fn get_final_size(&self) -> Vec<u8, Global>
Get the value of the {name} field (copies contents)
sourcepub fn get_remaining_raw(&self) -> &[u8] ⓘ
 
pub fn get_remaining_raw(&self) -> &[u8] ⓘ
Get the raw &u8 value of the {name} field, without copying
sourcepub fn get_remaining(&self) -> Vec<u8, Global>
 
pub fn get_remaining(&self) -> Vec<u8, Global>
Get the value of the {name} field (copies contents)