pub struct ErrorStatus(/* private fields */);Expand description
A non-zero Zircon status code representing an error.
Because this wraps a NonZero<sys::zx_status_t>, Result<T, ErrorStatus> has a niche at 0
(ZX_OK), guaranteeing that Result<(), ErrorStatus> has the exact same 4-byte memory layout
and machine ABI as sys::zx_status_t (Status).
Implementations§
Source§impl ErrorStatus
impl ErrorStatus
pub fn from_raw(raw: zx_status_t) -> Option<Self>
pub fn into_raw(self) -> zx_status_t
pub fn ok(raw: zx_status_t) -> Result<(), Self>
Trait Implementations§
Source§impl Clone for ErrorStatus
impl Clone for ErrorStatus
Source§fn clone(&self) -> ErrorStatus
fn clone(&self) -> ErrorStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ErrorStatus
Source§impl Debug for ErrorStatus
impl Debug for ErrorStatus
Source§impl Display for ErrorStatus
impl Display for ErrorStatus
impl Eq for ErrorStatus
Source§impl Error for ErrorStatus
impl Error for ErrorStatus
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ErrorStatus> for Status
impl From<ErrorStatus> for Status
Source§fn from(err: ErrorStatus) -> Self
fn from(err: ErrorStatus) -> Self
Converts to this type from the input type.
Source§impl From<Status> for ErrorStatus
impl From<Status> for ErrorStatus
Source§impl Hash for ErrorStatus
impl Hash for ErrorStatus
Source§impl Ord for ErrorStatus
impl Ord for ErrorStatus
Source§fn cmp(&self, other: &ErrorStatus) -> Ordering
fn cmp(&self, other: &ErrorStatus) -> Ordering
1.21.0 (const: unstable)§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ErrorStatus
impl PartialEq for ErrorStatus
Source§impl PartialOrd for ErrorStatus
impl PartialOrd for ErrorStatus
impl StructuralPartialEq for ErrorStatus
Auto Trait Implementations§
impl Freeze for ErrorStatus
impl RefUnwindSafe for ErrorStatus
impl Send for ErrorStatus
impl Sync for ErrorStatus
impl Unpin for ErrorStatus
impl UnsafeUnpin for ErrorStatus
impl UnwindSafe for ErrorStatus
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)