[−][src]Struct uefi::proto::media::file::FileHandle
An opaque handle to some contiguous block of data on a volume.
A FileHandle
is just a wrapper around a UEFI file handle. Under the hood, it can either be a
RegularFile
or a Directory
; use the into_type()
or the unsafe
{RegularFile, Directory}::new()
methods to perform the conversion.
Dropping this structure will result in the file handle being closed.
Implementations
impl FileHandle
[src]
pub fn into_type(self) -> Result<FileType>
[src]
Converts File
into a more specific subtype based on if it is a
directory or not. It does this via a call to get_position
.
Trait Implementations
impl Drop for FileHandle
[src]
impl File for FileHandle
[src]
fn handle(&mut self) -> &mut FileHandle
[src]
fn open(
&mut self,
filename: &str,
open_mode: FileMode,
attributes: FileAttribute
) -> Result<FileHandle>
[src]
&mut self,
filename: &str,
open_mode: FileMode,
attributes: FileAttribute
) -> Result<FileHandle>
fn close(self)
[src]
fn delete(self) -> Result
[src]
fn get_info<'buf, Info: FileProtocolInfo + ?Sized>(
&mut self,
buffer: &'buf mut [u8]
) -> Result<&'buf mut Info, Option<usize>>
[src]
&mut self,
buffer: &'buf mut [u8]
) -> Result<&'buf mut Info, Option<usize>>
fn set_info<Info: FileProtocolInfo + ?Sized>(&mut self, info: &Info) -> Result
[src]
fn flush(&mut self) -> Result
[src]
Auto Trait Implementations
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,
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.
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>,