pub struct Xp3ArchiveWriter<T: Write + Seek> {Show 14 fields
file: Arc<Mutex<T>>,
segments: Arc<Mutex<HashMap<[u8; 32], WrittenSegment>>>,
items: Arc<Mutex<BTreeMap<String, ArchiveItem>>>,
runner: ThreadPool<Result<()>>,
compress_files: bool,
compress_index: bool,
zlib_compression_level: u32,
segmenter: Option<Arc<Box<dyn Segmenter + Send + Sync>>>,
stats: Arc<Stats>,
compress_workers: usize,
processing_segments: Arc<Mutex<HashSet<[u8; 32]>>>,
use_zstd: bool,
zstd_compression_level: i32,
no_adler: bool,
}Available on crate features
kirikiri and kirikiri-arc only.Fields§
§file: Arc<Mutex<T>>§segments: Arc<Mutex<HashMap<[u8; 32], WrittenSegment>>>§items: Arc<Mutex<BTreeMap<String, ArchiveItem>>>§runner: ThreadPool<Result<()>>§compress_files: bool§compress_index: bool§zlib_compression_level: u32§segmenter: Option<Arc<Box<dyn Segmenter + Send + Sync>>>§stats: Arc<Stats>§compress_workers: usize§processing_segments: Arc<Mutex<HashSet<[u8; 32]>>>§use_zstd: bool§zstd_compression_level: i32§no_adler: boolImplementations§
Trait Implementations§
Source§impl<T: Write + Seek + Sync + Send + 'static> Archive for Xp3ArchiveWriter<T>
impl<T: Write + Seek + Sync + Send + 'static> Archive for Xp3ArchiveWriter<T>
Source§fn new_file<'a>(
&'a mut self,
name: &str,
size: Option<u64>,
) -> Result<Box<dyn WriteSeek + 'a>>
fn new_file<'a>( &'a mut self, name: &str, size: Option<u64>, ) -> Result<Box<dyn WriteSeek + 'a>>
Creates a new file in the archive. Read more
Source§fn new_file_non_seek<'a>(
&'a mut self,
name: &str,
_size: Option<u64>,
) -> Result<Box<dyn Write + 'a>>
fn new_file_non_seek<'a>( &'a mut self, name: &str, _size: Option<u64>, ) -> Result<Box<dyn Write + 'a>>
Creates a new file in the archive that does not require seeking. Read more
Source§fn write_header(&mut self) -> Result<()>
fn write_header(&mut self) -> Result<()>
Writes the header of the archive. (Must be called after writing all files.)
Auto Trait Implementations§
impl<T> Freeze for Xp3ArchiveWriter<T>
impl<T> !RefUnwindSafe for Xp3ArchiveWriter<T>
impl<T> Send for Xp3ArchiveWriter<T>where
T: Send,
impl<T> Sync for Xp3ArchiveWriter<T>where
T: Send,
impl<T> Unpin for Xp3ArchiveWriter<T>
impl<T> !UnwindSafe for Xp3ArchiveWriter<T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more