pub struct Writer<F: AsyncRead + Unpin> { /* private fields */ }
Expand description

Asar archive writer.

Implementations

Creates a new, empty archive writer.

Add an entry to the archive.

The entry’s parent directories are created recursively if they do not exist.

size should correspond with content. If size is smaller, exactly size bytes will be written. If size is bigger, the Writer::write method will fail. For convenience, you may want to use add_sized.

Panic

The method panics if normalised path contains no filename, or if the path is already occupied by a previously inserted file.

Adds an empty folder recursively to the archive.

Finishes the archive and writes the content into dest.

Add an entry to the archive.

Similar to Writer::add, but it uses AsyncSeekExt::seek to determine the size of the content.

For more information see Writer::add.

Available on crate feature integrity only.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.