Struct uefi::proto::media::block::BlockIO[][src]

#[repr(C)]
pub struct BlockIO { /* fields omitted */ }
Expand description

The Block I/O protocol.

Implementations

impl BlockIO[src]

pub fn media(&self) -> &BlockIOMedia[src]

Pointer for block IO media.

pub fn reset(&mut self, extended_verification: bool) -> Result[src]

Resets the block device hardware.

Arguments

  • extended_verification Indicates that the driver may perform a more exhaustive verification operation of the device during reset.

Errors

  • uefi::Status::DEVICE_ERROR The block device is not functioning correctly and could not be reset.

pub fn read_blocks(&self, media_id: u32, lba: Lba, buffer: &mut [u8]) -> Result[src]

Read the requested number of blocks from the device.

Arguments

  • media_id - The media ID that the read request is for.
  • lba - The starting logical block address to read from on the device.
  • buffer - The target buffer of the read operation

Errors

  • uefi::Status::DEVICE_ERROR The device reported an error while attempting to perform the read operation.
  • uefi::Status::NO_MEDIA There is no media in the device.
  • uefi::Status::MEDIA_CHANGED The media_id is not for the current media.
  • uefi::Status::BAD_BUFFER_SIZE The buffer size parameter is not a multiple of the intrinsic block size of the device.
  • uefi::Status::INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not on proper alignment.

pub fn write_blocks(&mut self, media_id: u32, lba: Lba, buffer: &[u8]) -> Result[src]

Writes the requested number of blocks to the device.

Arguments

  • media_id The media ID that the write request is for.
  • lba The starting logical block address to be written.
  • buffer Buffer to be written

Errors

  • uefi::Status::WRITE_PROTECTED The device cannot be written to.
  • uefi::Status::NO_MEDIA There is no media in the device.
  • uefi::Status::MEDIA_CHANGED The media_id is not for the current media.
  • uefi::Status::DEVICE_ERROR The device reported an error while attempting to perform the write operation.
  • uefi::Status::BAD_BUFFER_SIZE The buffer size parameter is not a multiple of the intrinsic block size of the device.
  • uefi::Status::INVALID_PARAMETER The write request contains LBAs that are not valid, or the buffer is not on proper alignment.

pub fn flush_blocks(&mut self) -> Result[src]

Flushes all modified data to a physical block device.

Errors

  • uefi::Status::DEVICE_ERROR The device reported an error while attempting to write data.
  • uefi::Status::NO_MEDIA There is no media in the device.

Trait Implementations

impl Identify for BlockIO[src]

const GUID: Guid[src]

Unique protocol identifier.

impl Protocol for BlockIO[src]

impl !Send for BlockIO[src]

impl !Sync for BlockIO[src]

Auto Trait Implementations

impl Unpin for BlockIO

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.