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>
impl<HR, HS, W, E> HeaderRewriter<'_, HR, HS, W, E>
Sourcepub fn new(
rewrite: HR,
summarize: HS,
packet_writer: PacketWriter<'_, W>,
) -> HeaderRewriter<'_, HR, HS, W, E>
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.
Sourcepub fn submit(&mut self, packet: Packet) -> Result<SubmitResult<HS::Summary>, E>
pub fn submit(&mut self, packet: Packet) -> Result<SubmitResult<HS::Summary>, E>
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>
impl<'a, HR, HS, W: Write, E> Debug for HeaderRewriter<'a, HR, HS, W, E>
Auto Trait Implementations§
impl<'a, HR, HS, W, E> Freeze for HeaderRewriter<'a, HR, HS, W, E>
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>
impl<'a, HR, HS, W, E> Sync for HeaderRewriter<'a, HR, HS, W, E>
impl<'a, HR, HS, W, E> Unpin for HeaderRewriter<'a, HR, HS, W, E>
impl<'a, HR, HS, W, E> UnwindSafe for HeaderRewriter<'a, HR, HS, W, E>
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