Struct uefi::Status [−][src]
#[must_use]#[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.
Implementations
impl Status
[src]
impl Status
[src]pub const WARN_UNKNOWN_GLYPH: Status
[src]
pub const WARN_UNKNOWN_GLYPH: Status
[src]The string contained characters that could not be rendered and were skipped.
pub const WARN_DELETE_FAILURE: Status
[src]
pub const WARN_DELETE_FAILURE: Status
[src]The handle was closed, but the file was not deleted.
pub const WARN_WRITE_FAILURE: Status
[src]
pub const WARN_WRITE_FAILURE: Status
[src]The handle was closed, but the data to the file was not flushed properly.
pub const WARN_BUFFER_TOO_SMALL: Status
[src]
pub const WARN_BUFFER_TOO_SMALL: Status
[src]The resulting buffer was too small, and the data was truncated.
pub const WARN_STALE_DATA: Status
[src]
pub const WARN_STALE_DATA: Status
[src]The data has not been updated within the timeframe set by local policy.
pub const WARN_FILE_SYSTEM: Status
[src]
pub const WARN_FILE_SYSTEM: Status
[src]The resulting buffer contains UEFI-compliant file system.
pub const WARN_RESET_REQUIRED: Status
[src]
pub const WARN_RESET_REQUIRED: Status
[src]The operation will be processed across a system reset.
pub const LOAD_ERROR: Status
[src]
pub const LOAD_ERROR: Status
[src]The image failed to load.
pub const INVALID_PARAMETER: Status
[src]
pub const INVALID_PARAMETER: Status
[src]A parameter was incorrect.
pub const UNSUPPORTED: Status
[src]
pub const UNSUPPORTED: Status
[src]The operation is not supported.
pub const BAD_BUFFER_SIZE: Status
[src]
pub const BAD_BUFFER_SIZE: Status
[src]The buffer was not the proper size for the request.
pub const BUFFER_TOO_SMALL: Status
[src]
pub const BUFFER_TOO_SMALL: Status
[src]The buffer is not large enough to hold the requested data. The required buffer size is returned in the appropriate parameter.
pub const DEVICE_ERROR: Status
[src]
pub const DEVICE_ERROR: Status
[src]The physical device reported an error while attempting the operation.
pub const WRITE_PROTECTED: Status
[src]
pub const WRITE_PROTECTED: Status
[src]The device cannot be written to.
pub const OUT_OF_RESOURCES: Status
[src]
pub const OUT_OF_RESOURCES: Status
[src]A resource has run out.
pub const VOLUME_CORRUPTED: Status
[src]
pub const VOLUME_CORRUPTED: Status
[src]An inconstency was detected on the file system.
pub const VOLUME_FULL: Status
[src]
pub const VOLUME_FULL: Status
[src]There is no more space on the file system.
pub const MEDIA_CHANGED: Status
[src]
pub const MEDIA_CHANGED: Status
[src]The medium in the device has changed since the last access.
pub const ACCESS_DENIED: Status
[src]
pub const ACCESS_DENIED: Status
[src]Access was denied.
pub const NO_RESPONSE: Status
[src]
pub const NO_RESPONSE: Status
[src]The server was not found or did not respond to the request.
pub const NO_MAPPING: Status
[src]
pub const NO_MAPPING: Status
[src]A mapping to a device does not exist.
pub const NOT_STARTED: Status
[src]
pub const NOT_STARTED: Status
[src]The protocol has not been started.
pub const ALREADY_STARTED: Status
[src]
pub const ALREADY_STARTED: Status
[src]The protocol has already been started.
pub const ICMP_ERROR: Status
[src]
pub const ICMP_ERROR: Status
[src]An ICMP error occurred during the network operation.
pub const TFTP_ERROR: Status
[src]
pub const TFTP_ERROR: Status
[src]A TFTP error occurred during the network operation.
pub const PROTOCOL_ERROR: Status
[src]
pub const PROTOCOL_ERROR: Status
[src]A protocol error occurred during the network operation.
pub const INCOMPATIBLE_VERSION: Status
[src]
pub const INCOMPATIBLE_VERSION: Status
[src]The function encountered an internal version that was incompatible with a version requested by the caller.
pub const SECURITY_VIOLATION: Status
[src]
pub const SECURITY_VIOLATION: Status
[src]The function was not performed due to a security violation.
pub const END_OF_MEDIA: Status
[src]
pub const END_OF_MEDIA: Status
[src]Beginning or end of media was reached
pub const END_OF_FILE: Status
[src]
pub const END_OF_FILE: Status
[src]The end of the file was reached.
pub const INVALID_LANGUAGE: Status
[src]
pub const INVALID_LANGUAGE: Status
[src]The language specified was invalid.
pub const COMPROMISED_DATA: Status
[src]
pub const COMPROMISED_DATA: Status
[src]The security status of the data is unknown or compromised and the data must be updated or replaced to restore a valid security status.
pub const IP_ADDRESS_CONFLICT: Status
[src]
pub const IP_ADDRESS_CONFLICT: Status
[src]There is an address conflict address allocation
pub const HTTP_ERROR: Status
[src]
pub const HTTP_ERROR: Status
[src]A HTTP error occurred during the network operation.
impl Status
[src]
impl Status
[src]pub fn is_success(self) -> bool
[src]
pub fn is_success(self) -> bool
[src]Returns true if status code indicates success.
pub fn is_warning(self) -> bool
[src]
pub fn is_warning(self) -> bool
[src]Returns true if status code indicates a warning.
pub fn into_with_val<T>(self, val: impl FnOnce() -> T) -> Result<T, ()>
[src]
pub fn into_with_val<T>(self, val: impl FnOnce() -> T) -> Result<T, ()>
[src]Converts this status code into a result with a given value.
Trait Implementations
impl From<Status> for Completion<()>
[src]
impl From<Status> for Completion<()>
[src]impl FromResidual<<Status as Try>::Residual> for Status
[src]
impl FromResidual<<Status as Try>::Residual> for Status
[src]fn from_residual(r: StatusResidual) -> Self
[src]
fn from_residual(r: StatusResidual) -> Self
[src]try_trait_v2
)Constructs the type from a compatible Residual
type. Read more
impl Try for Status
[src]
impl Try for Status
[src]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
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>
[src]
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>
[src]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
fn from_output(output: Self::Output) -> Self
[src]
fn from_output(output: Self::Output) -> Self
[src]try_trait_v2
)Constructs the type from its Output
type. Read more