pub struct WebFile { /* private fields */ }Available on crate feature
web only.Expand description
A provider for the File trait which delegates to web APIs
Trait Implementations§
Source§impl Directory<WebFile> for WebDirectory
impl Directory<WebFile> for WebDirectory
Source§async fn open_subdir(&self, name: &[u8]) -> Result<Self, FileSystemError>
async fn open_subdir(&self, name: &[u8]) -> Result<Self, FileSystemError>
Open a subdirectory of this directory
Source§impl File for WebFile
impl File for WebFile
Source§async fn read_all(&mut self) -> Result<Vec<u8>, FileSystemError>
async fn read_all(&mut self) -> Result<Vec<u8>, FileSystemError>
Read everything in the file Read more
Source§async fn read_segment(
&mut self,
offset: Offset,
dest: &mut [u8],
) -> Result<usize, FileSystemError>
async fn read_segment( &mut self, offset: Offset, dest: &mut [u8], ) -> Result<usize, FileSystemError>
Read a segment of the file into the destination buffer. If less data is
available than the size of the buffer, then only the first
n bytes of
the buffer are modified. Therefore implementors should take care not to
error on EOF conditions. Read moreAuto Trait Implementations§
impl Freeze for WebFile
impl RefUnwindSafe for WebFile
impl Send for WebFile
impl Sync for WebFile
impl Unpin for WebFile
impl UnsafeUnpin for WebFile
impl UnwindSafe for WebFile
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