[−][src]Struct smash_arc::ArcFile
A struct representing the data.arc file
Fields
stream_section_offset: u64
file_section_offset: u64
file_system: FileSystem
patch_section: u64
reader: Mutex<Box<dyn SeekRead>>
dirs: HashMap<Hash40, Vec<FileNode>>
Implementations
impl ArcFile
[src]
pub fn open<P: AsRef<Path>>(path: P) -> BinResult<Self>
[src]
pub fn open_over_network<Addr: ToSocketAddrs>(ip: Addr) -> BinResult<Self>
[src]
pub fn from_reader<R: SeekRead + 'static>(mut reader: R) -> BinResult<Self>
[src]
pub fn get_dir_listing<Hash: Into<Hash40>>(
&self,
hash: Hash
) -> Option<&[FileNode]>
[src]
&self,
hash: Hash
) -> Option<&[FileNode]>
Trait Implementations
impl ArcLookup for ArcFile
[src]
fn get_file_info_buckets(&self) -> &[FileInfoBucket]
[src]
fn get_file_hash_to_path_index(&self) -> &[HashToIndex]
[src]
fn get_dir_hash_to_info_index(&self) -> &[HashToIndex]
[src]
fn get_dir_infos(&self) -> &[DirInfo]
[src]
fn get_file_paths(&self) -> &[FilePath]
[src]
fn get_file_info_indices(&self) -> &[FileInfoIndex]
[src]
fn get_file_infos(&self) -> &[FileInfo]
[src]
fn get_file_infos_mut(&mut self) -> &mut [FileInfo]
[src]
fn get_file_info_to_datas(&self) -> &[FileInfoToFileData]
[src]
fn get_file_datas(&self) -> &[FileData]
[src]
fn get_file_datas_mut(&mut self) -> &mut [FileData]
[src]
fn get_folder_offsets(&self) -> &[DirectoryOffset]
[src]
fn get_stream_entries(&self) -> &[StreamEntry]
[src]
fn get_stream_file_indices(&self) -> &[u32]
[src]
fn get_stream_datas(&self) -> &[StreamData]
[src]
fn get_stream_hash_to_entries(&self) -> &[HashToIndex]
[src]
fn get_quick_dirs(&self) -> &[QuickDir]
[src]
fn get_file_section_offset(&self) -> u64
[src]
fn get_stream_section_offset(&self) -> u64
[src]
fn get_shared_section_offset(&self) -> u64
[src]
fn get_file_reader<'a>(&'a self) -> Box<dyn SeekRead + 'a>
[src]
fn get_file_contents<Hash: Into<Hash40>>(
&self,
hash: Hash,
region: Region
) -> Result<Vec<u8>, LookupError>
[src]
&self,
hash: Hash,
region: Region
) -> Result<Vec<u8>, LookupError>
fn get_nonstream_file_contents<Hash: Into<Hash40>>(
&self,
hash: Hash,
region: Region
) -> Result<Vec<u8>, LookupError>
[src]
&self,
hash: Hash,
region: Region
) -> Result<Vec<u8>, LookupError>
fn get_stream_data(&self, hash: Hash40) -> Result<&StreamData, LookupError>
[src]
fn get_stream_file_contents<Hash: Into<Hash40>>(
&self,
hash: Hash
) -> Result<Vec<u8>, LookupError>
[src]
&self,
hash: Hash
) -> Result<Vec<u8>, LookupError>
fn read_stream_file_data(
&self,
file_data: &StreamData
) -> Result<Vec<u8>, LookupError>
[src]
&self,
file_data: &StreamData
) -> Result<Vec<u8>, LookupError>
fn get_shared_files(
&self,
hash: Hash40,
region: Region
) -> Result<Vec<Hash40>, LookupError>
[src]
&self,
hash: Hash40,
region: Region
) -> Result<Vec<Hash40>, LookupError>
fn get_bucket_for_hash(&self, hash: Hash40) -> &[HashToIndex]
[src]
fn get_file_path_index_from_hash(
&self,
hash: Hash40
) -> Result<u32, LookupError>
[src]
&self,
hash: Hash40
) -> Result<u32, LookupError>
fn get_file_info_from_hash(
&self,
hash: Hash40
) -> Result<&FileInfo, LookupError>
[src]
&self,
hash: Hash40
) -> Result<&FileInfo, LookupError>
fn get_dir_info_from_hash<Hash: Into<Hash40>>(
&self,
hash: Hash
) -> Result<&DirInfo, LookupError>
[src]
&self,
hash: Hash
) -> Result<&DirInfo, LookupError>
fn get_stream_listing(&self, dir: &str) -> Result<&[StreamEntry], LookupError>
[src]
fn get_file_info_from_path_index(&self, path_index: u32) -> &FileInfo
[src]
fn get_file_info_from_path_index_mut(
&mut self,
path_index: u32
) -> &mut FileInfo
[src]
&mut self,
path_index: u32
) -> &mut FileInfo
fn get_file_in_folder(
&self,
file_info: &FileInfo,
region: Region
) -> FileInfoToFileData
[src]
&self,
file_info: &FileInfo,
region: Region
) -> FileInfoToFileData
fn get_file_data_from_hash(
&self,
hash: Hash40,
region: Region
) -> Result<&FileData, LookupError>
[src]
&self,
hash: Hash40,
region: Region
) -> Result<&FileData, LookupError>
fn get_file_data(&self, file_info: &FileInfo, region: Region) -> &FileData
[src]
fn get_file_data_mut(
&mut self,
file_info: &FileInfo,
region: Region
) -> &mut FileData
[src]
&mut self,
file_info: &FileInfo,
region: Region
) -> &mut FileData
fn get_folder_offset(&self, file_info: &FileInfo, region: Region) -> u64
[src]
fn read_file_data(
&self,
file_data: &FileData,
folder_offset: u64
) -> Result<Vec<u8>, LookupError>
[src]
&self,
file_data: &FileData,
folder_offset: u64
) -> Result<Vec<u8>, LookupError>
fn get_file_offset_from_hash(
&self,
hash: Hash40,
region: Region
) -> Result<u64, LookupError>
[src]
&self,
hash: Hash40,
region: Region
) -> Result<u64, LookupError>
fn get_file_metadata<Hash: Into<Hash40>>(
&self,
hash: Hash,
region: Region
) -> Result<FileMetadata, LookupError>
[src]
&self,
hash: Hash,
region: Region
) -> Result<FileMetadata, LookupError>
impl BinRead for ArcFile
[src]
type Args = ()
The type of arguments needed to be supplied in order to read this type, usually a tuple. Read more
fn read_options<R: Read + Seek>(
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
[src]
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
fn after_parse<R: Read + Seek>(
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
[src]
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
pub fn read<R>(reader: &mut R) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn read_args<R>(reader: &mut R, args: Self::Args) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn args_default() -> Option<Self::Args>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArcFile
[src]
impl !Send for ArcFile
[src]
impl !Sync for ArcFile
[src]
impl Unpin for ArcFile
[src]
impl UnwindSafe for ArcFile
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,