Status

Struct Status 

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

A value that represents success, a warning, or an error.

Tuple Fields§

§0: usize

Implementations§

Source§

impl Status

Source

pub const ERROR_BIT: usize = 9_223_372_036_854_775_808usize

Source

pub const SUCCESS: Status

The operation completed successfully.

Source

pub const WARN_UNKNOWN_GLYPH: Status

The string contained one or more characters that the device could not render 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.

Source

pub const WARN_BUFFER_TOO_SMALL: Status

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

Source

pub const WARN_STALE_DATA: Status

The data has not been updated without the timeframe set by local policy for this type of data.

Source

pub const WARN_FILE_SYSTEM: Status

The resulting buffer contains a 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.

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 inconsistency 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 allocation.

Source

pub const HTTP_ERROR: Status

An HTTP error occurred during the network operation.

Source

pub fn is_success(&self) -> bool

Returns true if the value represents a success.

Source

pub fn is_error(&self) -> bool

Returns true if the value represents an error.

Source

pub fn is_warning(&self) -> bool

Returns true if the value represents a warning.

Trait Implementations§

Source§

impl Clone for Status

Source§

fn clone(&self) -> Status

Returns a duplicate 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<(), Error>

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

impl Display for Status

Source§

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

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

impl<T> From<Result<T, Status>> for Status

Source§

fn from(res: Result<T, Status>) -> Status

Converts to this type from the input type.
Source§

impl From<Status> for Result<(), Status>

Source§

fn from(status: Status) -> Result<(), Status>

Converts to this type from the input type.
Source§

impl From<usize> for Status

Source§

fn from(value: usize) -> Status

Converts to this type from the input type.
Source§

impl LowerHex for Status

Source§

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

Formats the value using the given formatter. 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 UpperHex for Status

Source§

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

Formats the value using the given formatter. 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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.