pub enum ReturnCode {
Success,
Error(ErrorCode),
}Expand description
Composite type for capturing success and error return codes. See Table 5 Return error codes
Clients can use ReturnCode to parse the result register value of a PSCI calls and easily
determine if it was a success or an error.
Error codes are handled by the ErrorCode type. Having a separate type for errors helps using
Result<(), ErrorCode>. If a single type would include both success and error values,
then Err(ErrorCode::Success) would be incomprehensible.
Variants§
Trait Implementations§
Source§impl Clone for ReturnCode
impl Clone for ReturnCode
Source§fn clone(&self) -> ReturnCode
fn clone(&self) -> ReturnCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReturnCode
impl Debug for ReturnCode
Source§impl From<ReturnCode> for i32
impl From<ReturnCode> for i32
Source§fn from(value: ReturnCode) -> Self
fn from(value: ReturnCode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ReturnCode
impl PartialEq for ReturnCode
Source§impl TryFrom<i32> for ReturnCode
impl TryFrom<i32> for ReturnCode
impl Copy for ReturnCode
impl Eq for ReturnCode
impl StructuralPartialEq for ReturnCode
Auto Trait Implementations§
impl Freeze for ReturnCode
impl RefUnwindSafe for ReturnCode
impl Send for ReturnCode
impl Sync for ReturnCode
impl Unpin for ReturnCode
impl UnwindSafe for ReturnCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more