pub struct SharedMemory {
pub version: u32,
pub build_number: u32,
pub region: [u8; 4],
pub flags: SharedMemoryFlags,
pub archive_count: u32,
pub index_count: u32,
pub total_size: u64,
pub free_space: u64,
pub data_path: String,
}Expand description
Shared memory structure for CASC storage
Fields§
§version: u32Version of the shared memory format
build_number: u32Build number of the game
region: [u8; 4]Game region (e.g., “US”, “EU”)
flags: SharedMemoryFlagsStatus flags
archive_count: u32Number of archives
index_count: u32Number of indices
total_size: u64Total storage size in bytes
free_space: u64Available space in bytes
data_path: StringPath to data directory
Implementations§
Sourcepub fn write_to_file(&self, path: &Path) -> Result<()>
pub fn write_to_file(&self, path: &Path) -> Result<()>
Write shared memory to a file
Sourcepub fn read_from_file(path: &Path) -> Result<Self>
pub fn read_from_file(path: &Path) -> Result<Self>
Read shared memory from a file
Sourcepub fn update_stats(
&mut self,
archive_count: u32,
index_count: u32,
total_size: u64,
)
pub fn update_stats( &mut self, archive_count: u32, index_count: u32, total_size: u64, )
Update statistics
Sourcepub fn set_updating(&mut self, updating: bool)
pub fn set_updating(&mut self, updating: bool)
Mark as updating
Sourcepub fn set_needs_repair(&mut self, needs_repair: bool)
pub fn set_needs_repair(&mut self, needs_repair: bool)
Mark as needing repair
Trait Implementations§
Auto Trait Implementations§
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