pub struct FileReadOptions { /* private fields */ }
Expand description
Common parameters to configure how files are read.
use ba2::{
tes4::{FileReadOptions, Version},
CompressionResult,
};
// Read and compress a file for TES:IV
let _ = FileReadOptions::builder()
.version(Version::TES4)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for F3/FNV/TES:V
let _ = FileReadOptions::builder()
.version(Version::FO3)
.compression_result(CompressionResult::Compressed)
.build();
// Read and compress a file for SSE
let _ = FileReadOptions::builder()
.version(Version::SSE)
.compression_result(CompressionResult::Compressed)
.build();
Implementations§
Source§impl ReadOptions
impl ReadOptions
pub fn builder() -> ReadOptionsBuilder
pub fn compression_codec(&self) -> CompressionCodec
pub fn compression_result(&self) -> CompressionResult
pub fn version(&self) -> Version
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§fn default() -> ReadOptions
fn default() -> ReadOptions
Returns the “default value” for a type. Read more
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