Struct ba2::fo4::FileReadOptions
source · 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 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