pub struct AlopexFileReader { /* private fields */ }Expand description
ネイティブ向けファイルリーダー(mmap)。
Trait Implementations§
Source§impl FileReader for AlopexFileReader
Available on non-WebAssembly only.
impl FileReader for AlopexFileReader
Available on non-WebAssembly only.
Source§fn open(source: FileSource) -> Result<Self, FormatError>
fn open(source: FileSource) -> Result<Self, FormatError>
ファイルを開き、ヘッダー/フッター/セクションインデックスを初期化する。
Source§fn header(&self) -> &FileHeader
fn header(&self) -> &FileHeader
ヘッダーへの参照を返す。
フッターへの参照を返す。
Source§fn section_index(&self) -> &SectionIndex
fn section_index(&self) -> &SectionIndex
セクションインデックスへの参照を返す。
Source§fn read_section(&self, section_id: u32) -> Result<Vec<u8>, FormatError>
fn read_section(&self, section_id: u32) -> Result<Vec<u8>, FormatError>
指定セクションを解凍済みバイト列で読み取る。
Source§fn read_section_raw(&self, section_id: u32) -> Result<Vec<u8>, FormatError>
fn read_section_raw(&self, section_id: u32) -> Result<Vec<u8>, FormatError>
指定セクションを圧縮状態のまま読み取る。
Source§fn validate_section(&self, section_id: u32) -> Result<(), FormatError>
fn validate_section(&self, section_id: u32) -> Result<(), FormatError>
指定セクションのチェックサムを検証する(圧縮後データを対象)。
Source§fn validate_all(&self) -> Result<(), FormatError>
fn validate_all(&self) -> Result<(), FormatError>
全セクションの整合性を検証する。
Source§fn prefetch_sections<'a>(
&'a self,
_section_ids: &'a [u32],
) -> PrefetchFuture<'a>
fn prefetch_sections<'a>( &'a self, _section_ids: &'a [u32], ) -> PrefetchFuture<'a>
指定セクションを事前読み込みする(WASMではIndexedDBからの範囲読み込みを想定)。
Auto Trait Implementations§
impl Freeze for AlopexFileReader
impl RefUnwindSafe for AlopexFileReader
impl Send for AlopexFileReader
impl Sync for AlopexFileReader
impl Unpin for AlopexFileReader
impl UnsafeUnpin for AlopexFileReader
impl UnwindSafe for AlopexFileReader
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