HeaderRewriter

Struct HeaderRewriter 

Source
pub struct HeaderRewriter<'a, HR: HeaderRewrite, HS: HeaderSummarize, W: Write, E> { /* private fields */ }
Expand description

Re-writes an Ogg Opus stream with modified headers

Implementations§

Source§

impl<HR, HS, W, E> HeaderRewriter<'_, HR, HS, W, E>
where HR: HeaderRewrite<Error = E>, HS: HeaderSummarize<Error = E>, W: Write,

Source

pub fn new( rewrite: HR, summarize: HS, packet_writer: PacketWriter<'_, W>, ) -> HeaderRewriter<'_, HR, HS, W, E>

Constructs a new rewriter

  • config - the configuration for volume rewriting.
  • packet_writer - the Ogg stream writer that the rewritten packets will be sent to.
Source

pub fn submit(&mut self, packet: Packet) -> Result<SubmitResult<HS::Summary>, E>
where HR::Error: From<Error>,

Submits a new packet to the rewriter. If Ready is returned, another packet from the same stream should continue to be submitted. If HeadersUnchanged is returned, the supplied stream did not need any alterations. In this case, the partial output should be discarded and no further packets submitted.

Trait Implementations§

Source§

impl<'a, HR, HS, W: Write, E> Debug for HeaderRewriter<'a, HR, HS, W, E>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, HR, HS, W, E> Freeze for HeaderRewriter<'a, HR, HS, W, E>
where HR: Freeze, HS: Freeze, W: Freeze,

§

impl<'a, HR, HS, W, E> RefUnwindSafe for HeaderRewriter<'a, HR, HS, W, E>

§

impl<'a, HR, HS, W, E> Send for HeaderRewriter<'a, HR, HS, W, E>
where HR: Send, HS: Send, W: Send, E: Send,

§

impl<'a, HR, HS, W, E> Sync for HeaderRewriter<'a, HR, HS, W, E>
where HR: Sync, HS: Sync, W: Sync, E: Sync,

§

impl<'a, HR, HS, W, E> Unpin for HeaderRewriter<'a, HR, HS, W, E>
where HR: Unpin, HS: Unpin, W: Unpin, E: Unpin,

§

impl<'a, HR, HS, W, E> UnwindSafe for HeaderRewriter<'a, HR, HS, W, E>
where HR: UnwindSafe, HS: UnwindSafe, W: UnwindSafe, E: UnwindSafe,

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.