Struct ogg::writing::PacketWriter
source · pub struct PacketWriter<T: Write> { /* private fields */ }
Expand description
Writer for packets into an Ogg stream.
Note that the functionality of this struct isn’t as well tested as for
the PacketReader
struct.
Implementations§
source§impl<T: Write> PacketWriter<T>
impl<T: Write> PacketWriter<T>
pub fn new(wtr: T) -> Self
pub fn into_inner(self) -> T
sourcepub fn inner(&self) -> &T
pub fn inner(&self) -> &T
Access the interior writer
This allows access of the writer contained inside. No guarantees are given onto the pattern of the writes. They may change in the future.
sourcepub fn inner_mut(&mut self) -> &mut T
pub fn inner_mut(&mut self) -> &mut T
Access the interior writer mutably
This allows access of the writer contained inside. No guarantees are given onto the pattern of the writes. They may change in the future.
sourcepub fn write_packet(
&mut self,
pck_cont: Box<[u8]>,
serial: u32,
inf: PacketWriteEndInfo,
absgp: u64
) -> Result<(), Error>
pub fn write_packet( &mut self, pck_cont: Box<[u8]>, serial: u32, inf: PacketWriteEndInfo, absgp: u64 ) -> Result<(), Error>
Write a packet
source§impl<T: Seek + Write> PacketWriter<T>
impl<T: Seek + Write> PacketWriter<T>
pub fn get_current_offs(&mut self) -> Result<u64, Error>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PacketWriter<T>where
T: RefUnwindSafe,
impl<T> Send for PacketWriter<T>where
T: Send,
impl<T> Sync for PacketWriter<T>where
T: Sync,
impl<T> Unpin for PacketWriter<T>where
T: Unpin,
impl<T> UnwindSafe for PacketWriter<T>where
T: UnwindSafe,
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