Struct uefi_raw::Status

source ·
#[repr(transparent)]
pub struct Status(pub usize);
Expand description

UEFI uses status codes in order to report successes, errors, and warnings.

The spec allows implementation-specific status codes, so the Status constants are not a comprehensive list of all possible values.

Tuple Fields§

§0: usize

Implementations§

source§

impl Status

source

pub const SUCCESS: Status = _

The operation completed successfully.

source

pub const WARN_UNKNOWN_GLYPH: Status = _

The string contained characters that could not be rendered and were skipped.

source

pub const WARN_DELETE_FAILURE: Status = _

The handle was closed, but the file was not deleted.

source

pub const WARN_WRITE_FAILURE: Status = _

The handle was closed, but the data to the file was not flushed properly.

source

pub const WARN_BUFFER_TOO_SMALL: Status = _

The resulting buffer was too small, and the data was truncated.

source

pub const WARN_STALE_DATA: Status = _

The data has not been updated within the timeframe set by local policy.

source

pub const WARN_FILE_SYSTEM: Status = _

The resulting buffer contains UEFI-compliant file system.

source

pub const WARN_RESET_REQUIRED: Status = _

The operation will be processed across a system reset.

source

pub const LOAD_ERROR: Status = _

The image failed to load.

source

pub const INVALID_PARAMETER: Status = _

A parameter was incorrect.

source

pub const UNSUPPORTED: Status = _

The operation is not supported.

source

pub const BAD_BUFFER_SIZE: Status = _

The buffer was not the proper size for the request.

source

pub const BUFFER_TOO_SMALL: Status = _

The buffer is not large enough to hold the requested data. The required buffer size is returned in the appropriate parameter.

source

pub const NOT_READY: Status = _

There is no data pending upon return.

source

pub const DEVICE_ERROR: Status = _

The physical device reported an error while attempting the operation.

source

pub const WRITE_PROTECTED: Status = _

The device cannot be written to.

source

pub const OUT_OF_RESOURCES: Status = _

A resource has run out.

source

pub const VOLUME_CORRUPTED: Status = _

An inconstency was detected on the file system.

source

pub const VOLUME_FULL: Status = _

There is no more space on the file system.

source

pub const NO_MEDIA: Status = _

The device does not contain any medium to perform the operation.

source

pub const MEDIA_CHANGED: Status = _

The medium in the device has changed since the last access.

source

pub const NOT_FOUND: Status = _

The item was not found.

source

pub const ACCESS_DENIED: Status = _

Access was denied.

source

pub const NO_RESPONSE: Status = _

The server was not found or did not respond to the request.

source

pub const NO_MAPPING: Status = _

A mapping to a device does not exist.

source

pub const TIMEOUT: Status = _

The timeout time expired.

source

pub const NOT_STARTED: Status = _

The protocol has not been started.

source

pub const ALREADY_STARTED: Status = _

The protocol has already been started.

source

pub const ABORTED: Status = _

The operation was aborted.

source

pub const ICMP_ERROR: Status = _

An ICMP error occurred during the network operation.

source

pub const TFTP_ERROR: Status = _

A TFTP error occurred during the network operation.

source

pub const PROTOCOL_ERROR: Status = _

A protocol error occurred during the network operation.

source

pub const INCOMPATIBLE_VERSION: Status = _

The function encountered an internal version that was incompatible with a version requested by the caller.

source

pub const SECURITY_VIOLATION: Status = _

The function was not performed due to a security violation.

source

pub const CRC_ERROR: Status = _

A CRC error was detected.

source

pub const END_OF_MEDIA: Status = _

Beginning or end of media was reached

source

pub const END_OF_FILE: Status = _

The end of the file was reached.

source

pub const INVALID_LANGUAGE: Status = _

The language specified was invalid.

source

pub const COMPROMISED_DATA: Status = _

The security status of the data is unknown or compromised and the data must be updated or replaced to restore a valid security status.

source

pub const IP_ADDRESS_CONFLICT: Status = _

There is an address conflict address allocation

source

pub const HTTP_ERROR: Status = _

A HTTP error occurred during the network operation.

source§

impl Status

source

pub const ERROR_BIT: usize = 9_223_372_036_854_775_808usize

Bit indicating that an UEFI status code is an error.

source

pub fn is_success(self) -> bool

Returns true if status code indicates success.

source

pub fn is_warning(self) -> bool

Returns true if status code indicates a warning.

source

pub const fn is_error(self) -> bool

Returns true if the status code indicates an error.

Trait Implementations§

source§

impl Clone for Status

source§

fn clone(&self) -> Status

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Status

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Status

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Status

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Status

source§

fn cmp(&self, other: &Status) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Status

source§

fn eq(&self, other: &Status) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Status

source§

fn partial_cmp(&self, other: &Status) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Status

source§

impl Eq for Status

source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

§

impl Freeze for Status

§

impl RefUnwindSafe for Status

§

impl Send for Status

§

impl Sync for Status

§

impl Unpin for Status

§

impl UnwindSafe for Status

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.