pub struct TsPacket<'a> {
pub header: TsHeader,
pub payload: Option<&'a [u8]>,
pub raw: &'a [u8; 188],
}Expand description
Borrowed view into one 188-byte TS packet.
Serde: Serialize-only. Deserialize is omitted because raw is a
reference to fixed-length 188-byte storage that cannot be reconstructed
from a deserializer’s lifetime budget; the field is also redundant once
the header has been parsed. raw is excluded from the serialized form.
Fields§
§header: TsHeaderParsed header fields.
payload: Option<&'a [u8]>Slice into the packet’s payload, or None when has_payload == false
or the adaptation field consumed the whole packet body.
raw: &'a [u8; 188]The raw 188 bytes of the packet — kept for cheap forwarding.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TsPacket<'a>
impl<'a> RefUnwindSafe for TsPacket<'a>
impl<'a> Send for TsPacket<'a>
impl<'a> Sync for TsPacket<'a>
impl<'a> Unpin for TsPacket<'a>
impl<'a> UnsafeUnpin for TsPacket<'a>
impl<'a> UnwindSafe for TsPacket<'a>
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