pub struct LoadFile2(/* private fields */);Expand description
Load File2 Protocol.
The Load File2 protocol is used to obtain files from arbitrary devices that are not boot options.
§UEFI Spec Description
The EFI_LOAD_FILE2_PROTOCOL is a simple protocol used to obtain files from arbitrary devices that are not boot options. It is used by LoadImage() when its BootOption parameter is FALSE and the FilePath does not have an instance of the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.
Implementations§
Source§impl LoadFile2
impl LoadFile2
Sourcepub fn load_file<'a>(&mut self, file_path: &DevicePath) -> Result<Box<[u8]>>
Available on crate feature alloc only.
pub fn load_file<'a>(&mut self, file_path: &DevicePath) -> Result<Box<[u8]>>
alloc only.Causes the driver to load a specified file.
§Arguments
file_pathThe device specific path of the file to load.
§Errors
Status::SUCCESSThe file was loaded.Status::UNSUPPORTEDBootPolicy is TRUE.Status::INVALID_PARAMETERFilePath is not a valid device path, or BufferSize is NULL.Status::NO_MEDIANo medium was present to load the file.Status::DEVICE_ERRORThe file was not loaded due to a device error.Status::NO_RESPONSEThe remote system did not respond.Status::NOT_FOUNDThe file was not found.Status::ABORTEDThe file load process was manually cancelled.Status::BUFFER_TOO_SMALLThe BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadFile2
impl RefUnwindSafe for LoadFile2
impl Send for LoadFile2
impl Sync for LoadFile2
impl Unpin for LoadFile2
impl UnwindSafe for LoadFile2
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