pub struct FileContent { /* private fields */ }Expand description
A file on the local filesystem.
Implementations§
Trait Implementations§
Source§impl Content for FileContent
impl Content for FileContent
Source§fn metadata(&self) -> ContentMetadata
fn metadata(&self) -> ContentMetadata
What the provider states about this content without reading it.
Source§fn open(&self) -> ContentFuture<'_, Result<ContentReaderRef, ContentError>>
fn open(&self) -> ContentFuture<'_, Result<ContentReaderRef, ContentError>>
Opens a chunked reader over the bytes.
Source§fn read_all(&self) -> ContentFuture<'_, Result<Vec<u8>, ContentError>>
fn read_all(&self) -> ContentFuture<'_, Result<Vec<u8>, ContentError>>
Reads every byte. The default drains
open; providers
already holding the bytes override it to avoid the copy.Auto Trait Implementations§
impl Freeze for FileContent
impl RefUnwindSafe for FileContent
impl Send for FileContent
impl Sync for FileContent
impl Unpin for FileContent
impl UnsafeUnpin for FileContent
impl UnwindSafe for FileContent
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