#[repr(transparent)]pub struct Status(pub usize);
Expand description
UEFI uses status codes in order to report successes, errors, and warnings.
Unfortunately, the spec allows and encourages implementation-specific non-portable status codes. Therefore, these cannot be modeled as a Rust enum, as injecting an unknown value in a Rust enum is undefined behaviour.
For lack of a better option, we therefore model them as a newtype of usize.
Tuple Fields
0: usize
Implementations
sourceimpl Status
impl Status
sourcepub const WARN_UNKNOWN_GLYPH: Status
pub const WARN_UNKNOWN_GLYPH: Status
The string contained characters that could not be rendered and were skipped.
sourcepub const WARN_DELETE_FAILURE: Status
pub const WARN_DELETE_FAILURE: Status
The handle was closed, but the file was not deleted.
sourcepub const WARN_WRITE_FAILURE: Status
pub const WARN_WRITE_FAILURE: Status
The handle was closed, but the data to the file was not flushed properly.
sourcepub const WARN_BUFFER_TOO_SMALL: Status
pub const WARN_BUFFER_TOO_SMALL: Status
The resulting buffer was too small, and the data was truncated.
sourcepub const WARN_STALE_DATA: Status
pub const WARN_STALE_DATA: Status
The data has not been updated within the timeframe set by local policy.
sourcepub const WARN_FILE_SYSTEM: Status
pub const WARN_FILE_SYSTEM: Status
The resulting buffer contains UEFI-compliant file system.
sourcepub const WARN_RESET_REQUIRED: Status
pub const WARN_RESET_REQUIRED: Status
The operation will be processed across a system reset.
sourcepub const LOAD_ERROR: Status
pub const LOAD_ERROR: Status
The image failed to load.
sourcepub const INVALID_PARAMETER: Status
pub const INVALID_PARAMETER: Status
A parameter was incorrect.
sourcepub const UNSUPPORTED: Status
pub const UNSUPPORTED: Status
The operation is not supported.
sourcepub const BAD_BUFFER_SIZE: Status
pub const BAD_BUFFER_SIZE: Status
The buffer was not the proper size for the request.
sourcepub const BUFFER_TOO_SMALL: Status
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.
sourcepub const DEVICE_ERROR: Status
pub const DEVICE_ERROR: Status
The physical device reported an error while attempting the operation.
sourcepub const WRITE_PROTECTED: Status
pub const WRITE_PROTECTED: Status
The device cannot be written to.
sourcepub const OUT_OF_RESOURCES: Status
pub const OUT_OF_RESOURCES: Status
A resource has run out.
sourcepub const VOLUME_CORRUPTED: Status
pub const VOLUME_CORRUPTED: Status
An inconstency was detected on the file system.
sourcepub const VOLUME_FULL: Status
pub const VOLUME_FULL: Status
There is no more space on the file system.
sourcepub const MEDIA_CHANGED: Status
pub const MEDIA_CHANGED: Status
The medium in the device has changed since the last access.
sourcepub const ACCESS_DENIED: Status
pub const ACCESS_DENIED: Status
Access was denied.
sourcepub const NO_RESPONSE: Status
pub const NO_RESPONSE: Status
The server was not found or did not respond to the request.
sourcepub const NO_MAPPING: Status
pub const NO_MAPPING: Status
A mapping to a device does not exist.
sourcepub const NOT_STARTED: Status
pub const NOT_STARTED: Status
The protocol has not been started.
sourcepub const ALREADY_STARTED: Status
pub const ALREADY_STARTED: Status
The protocol has already been started.
sourcepub const ICMP_ERROR: Status
pub const ICMP_ERROR: Status
An ICMP error occurred during the network operation.
sourcepub const TFTP_ERROR: Status
pub const TFTP_ERROR: Status
A TFTP error occurred during the network operation.
sourcepub const PROTOCOL_ERROR: Status
pub const PROTOCOL_ERROR: Status
A protocol error occurred during the network operation.
sourcepub const INCOMPATIBLE_VERSION: Status
pub const INCOMPATIBLE_VERSION: Status
The function encountered an internal version that was incompatible with a version requested by the caller.
sourcepub const SECURITY_VIOLATION: Status
pub const SECURITY_VIOLATION: Status
The function was not performed due to a security violation.
sourcepub const END_OF_MEDIA: Status
pub const END_OF_MEDIA: Status
Beginning or end of media was reached
sourcepub const END_OF_FILE: Status
pub const END_OF_FILE: Status
The end of the file was reached.
sourcepub const INVALID_LANGUAGE: Status
pub const INVALID_LANGUAGE: Status
The language specified was invalid.
sourcepub const COMPROMISED_DATA: Status
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.
sourcepub const IP_ADDRESS_CONFLICT: Status
pub const IP_ADDRESS_CONFLICT: Status
There is an address conflict address allocation
sourcepub const HTTP_ERROR: Status
pub const HTTP_ERROR: Status
A HTTP error occurred during the network operation.
sourceimpl Status
impl Status
sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
Returns true if status code indicates success.
sourcepub fn is_warning(self) -> bool
pub fn is_warning(self) -> bool
Returns true if status code indicates a warning.
sourcepub fn into_with_val<T>(self, val: impl FnOnce() -> T) -> Result<T, ()>
pub fn into_with_val<T>(self, val: impl FnOnce() -> T) -> Result<T, ()>
Converts this status code into a result with a given value.
Trait Implementations
sourceimpl From<Status> for Completion<()>
impl From<Status> for Completion<()>
sourceimpl FromResidual<<Status as Try>::Residual> for Status
impl FromResidual<<Status as Try>::Residual> for Status
sourcefn from_residual(r: StatusResidual) -> Self
fn from_residual(r: StatusResidual) -> Self
try_trait_v2
)Constructs the type from a compatible Residual
type. Read more
sourceimpl FromResidual<Result<Infallible, Error<()>>> for Status
impl FromResidual<Result<Infallible, Error<()>>> for Status
sourcefn from_residual(r: Result<Infallible, Error>) -> Self
fn from_residual(r: Result<Infallible, Error>) -> Self
try_trait_v2
)Constructs the type from a compatible Residual
type. Read more
sourceimpl Try for Status
impl Try for Status
type Output = Completion<()>
type Output = Completion<()>
try_trait_v2
)The type of the value produced by ?
when not short-circuiting.
type Residual = StatusResidual
type Residual = StatusResidual
try_trait_v2
)The type of the value passed to FromResidual::from_residual
as part of ?
when short-circuiting. Read more
sourcefn branch(self) -> ControlFlow<Self::Residual, Self::Output>
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>
try_trait_v2
)Used in ?
to decide whether the operator should produce a value
(because this returned ControlFlow::Continue
)
or propagate a value back to the caller
(because this returned ControlFlow::Break
). Read more
sourcefn from_output(output: Self::Output) -> Self
fn from_output(output: Self::Output) -> Self
try_trait_v2
)Constructs the type from its Output
type. Read more
impl Copy for Status
impl Eq for Status
impl StructuralEq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more