pub struct SevenZWriter<W: Write> { /* private fields */ }
Expand description

Writes a 7z file

Implementations§

source§

impl SevenZWriter<File>

source

pub fn create(path: impl AsRef<Path>) -> Result<Self, Error>

Creates a file to write a 7z archive to

source§

impl<W: Write + Seek> SevenZWriter<W>

source

pub fn new(writer: W) -> Result<Self, Error>

Prepares writer to write a 7z archive to

source

pub fn set_content_methods( &mut self, content_methods: Arc<Vec<SevenZMethodConfiguration>> )

Sets the default compression methods to use for entry contents. The default is LZMA2. And currently only support LZMA2

source

pub fn create_archive_entry( path: impl AsRef<Path>, entry_name: String ) -> SevenZArchiveEntry

Create an archive entry using the file in path and entry_name provided.

source

pub fn push_archive_entry<R: Read>( &mut self, entry: SevenZArchiveEntry, reader: Option<R> ) -> Result<&SevenZArchiveEntry, Error>

Adds an archive entry with data from reader

source

pub fn finish(self) -> Result<()>

Finishes the compression.

Auto Trait Implementations§

§

impl<W> RefUnwindSafe for SevenZWriter<W>where W: RefUnwindSafe,

§

impl<W> Send for SevenZWriter<W>where W: Send,

§

impl<W> Sync for SevenZWriter<W>where W: Sync,

§

impl<W> Unpin for SevenZWriter<W>where W: Unpin,

§

impl<W> UnwindSafe for SevenZWriter<W>where W: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.