Struct RepacketizerState

Source
pub struct RepacketizerState<'rp, 'buf> { /* private fields */ }
Expand description

An in-progress repacketization.

Implementations§

Source§

impl<'rp, 'buf> RepacketizerState<'rp, 'buf>

Source

pub fn cat(&mut self, packet: &'buf [u8]) -> Result<()>

Add a packet to the current repacketizer state.

Source

pub fn cat_move<'b2>( self, packet: &'b2 [u8], ) -> Result<RepacketizerState<'rp, 'b2>>
where 'buf: 'b2,

Add a packet to the current repacketizer state, moving it.

Source

pub fn get_nb_frames(&mut self) -> usize

Get the total number of frames contained in packet data submitted so far via cat.

Source

pub fn out(&mut self, buffer: &mut [u8]) -> Result<usize>

Construct a new packet from data previously submitted via cat.

All previously submitted frames are used.

Source

pub fn out_range( &mut self, begin: usize, end: usize, buffer: &mut [u8], ) -> Result<usize>

Construct a new packet from data previously submitted via cat, with a manually specified subrange.

The end index should not exceed the value of get_nb_frames().

Trait Implementations§

Source§

impl<'rp, 'buf> Debug for RepacketizerState<'rp, 'buf>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'rp, 'buf> Freeze for RepacketizerState<'rp, 'buf>

§

impl<'rp, 'buf> RefUnwindSafe for RepacketizerState<'rp, 'buf>

§

impl<'rp, 'buf> Send for RepacketizerState<'rp, 'buf>

§

impl<'rp, 'buf> !Sync for RepacketizerState<'rp, 'buf>

§

impl<'rp, 'buf> Unpin for RepacketizerState<'rp, 'buf>

§

impl<'rp, 'buf> !UnwindSafe for RepacketizerState<'rp, 'buf>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.