pub struct File { /* private fields */ }
Expand description
Represents a file, which may be embedded or dynamic.
Implementations§
Source§impl File
impl File
Sourcepub fn reader(&self) -> Result<FileReader, Error>
pub fn reader(&self) -> Result<FileReader, Error>
Returns a reader for the file’s contents. May return an error if the file cannot be opened.
Sourcepub fn is_embedded(&self) -> bool
pub fn is_embedded(&self) -> bool
Returns true if the file is embedded in the binary.
Sourcepub fn absolute_path(&self) -> Option<&Path>
pub fn absolute_path(&self) -> Option<&Path>
Returns the absolute path if the file is dynamic, or None if embedded.
Trait Implementations§
impl Eq for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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