pub struct FileReadOptions { /* private fields */ }
Expand description
Common parameters to configure how files are read.
use ba2::{
fo4::{CompressionFormat, CompressionLevel, FileReadOptions, Format},
CompressionResult,
};
// Read and compress a file for FO4/FO76, GNRL format
let _ = FileReadOptions::builder()
.format(Format::GNRL)
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for FO4/FO76, DX10 format
let _ = FileReadOptions::builder()
.format(Format::DX10)
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for FO4 on the xbox, GNRL format
let _ = FileReadOptions::builder()
.format(Format::GNRL)
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4Xbox)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for FO4 on the xbox, DX10 format
let _ = FileReadOptions::builder()
.format(Format::DX10)
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4Xbox)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for SF, GNRL format
let _ = FileReadOptions::builder()
.format(Format::GNRL)
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::SF)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for SF, DX10 format
let _ = FileReadOptions::builder()
.format(Format::DX10)
.compression_format(CompressionFormat::LZ4)
.compression_result(CompressionResult::Compressed)
.build();
Implementations§
Source§impl ReadOptions
impl ReadOptions
pub fn builder() -> ReadOptionsBuilder
pub fn compression_format(&self) -> CompressionFormat
pub fn compression_level(&self) -> CompressionLevel
pub fn compression_result(&self) -> CompressionResult
pub fn format(&self) -> Format
pub fn mip_chunk_height(&self) -> usize
pub fn mip_chunk_width(&self) -> usize
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§fn clone(&self) -> ReadOptions
fn clone(&self) -> ReadOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReadOptions
impl Debug for ReadOptions
Source§impl Default for ReadOptions
impl Default for ReadOptions
Source§impl From<&Options> for ReadOptions
impl From<&Options> for ReadOptions
Source§fn from(value: &ArchiveOptions) -> Self
fn from(value: &ArchiveOptions) -> Self
Converts to this type from the input type.
Source§impl From<Options> for ReadOptions
impl From<Options> for ReadOptions
Source§fn from(value: ArchiveOptions) -> Self
fn from(value: ArchiveOptions) -> Self
Converts to this type from the input type.
impl Copy for ReadOptions
Auto Trait Implementations§
impl Freeze for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnwindSafe for ReadOptions
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