pub struct Mp4Writer<W> { /* private fields */ }
Implementations§
source§impl<W> Mp4Writer<W>
impl<W> Mp4Writer<W>
sourcepub fn into_writer(self) -> W
pub fn into_writer(self) -> W
Consume self, returning the inner writer.
This can be useful to recover the inner writer after completion in case it’s owned by the Mp4Writer instance.
§Examples
use mp4::{Mp4Writer, Mp4Config};
use std::io::Cursor;
let config = Mp4Config {
major_brand: str::parse("isom").unwrap(),
minor_version: 512,
compatible_brands: vec![
str::parse("isom").unwrap(),
str::parse("iso2").unwrap(),
str::parse("avc1").unwrap(),
str::parse("mp41").unwrap(),
],
timescale: 1000,
};
let data = Cursor::new(Vec::<u8>::new());
let mut writer = mp4::Mp4Writer::write_start(data, &config)?;
writer.write_end()?;
let data: Vec<u8> = writer.into_writer().into_inner();
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Mp4Writer<W>where
W: Freeze,
impl<W> RefUnwindSafe for Mp4Writer<W>where
W: RefUnwindSafe,
impl<W> Send for Mp4Writer<W>where
W: Send,
impl<W> Sync for Mp4Writer<W>where
W: Sync,
impl<W> Unpin for Mp4Writer<W>where
W: Unpin,
impl<W> UnwindSafe for Mp4Writer<W>where
W: 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