zx

Struct Status

Source
pub struct Status(/* private fields */);
Expand description

Status type indicating the result of a Fuchsia syscall.

This type is generally used to indicate the reason for an error. While this type can contain Status::OK (ZX_OK in C land), elements of this type are generally constructed using the ok method, which checks for ZX_OK and returns a Result<(), Status> appropriately.

Implementations§

Source§

impl Status

Source

pub fn ok(raw: i32) -> Result<(), Status>

Returns Ok(()) if the status was OK, otherwise returns Err(status).

Source

pub fn from_raw(raw: i32) -> Status

Source

pub fn into_raw(self) -> i32

Source§

impl Status

Source

pub const OK: Status = _

Source

pub const INTERNAL: Status = _

Source

pub const NOT_SUPPORTED: Status = _

Source

pub const NO_RESOURCES: Status = _

Source

pub const NO_MEMORY: Status = _

Source

pub const INTERRUPTED_RETRY: Status = _

Source

pub const INVALID_ARGS: Status = _

Source

pub const BAD_HANDLE: Status = _

Source

pub const WRONG_TYPE: Status = _

Source

pub const BAD_SYSCALL: Status = _

Source

pub const OUT_OF_RANGE: Status = _

Source

pub const BUFFER_TOO_SMALL: Status = _

Source

pub const BAD_STATE: Status = _

Source

pub const TIMED_OUT: Status = _

Source

pub const SHOULD_WAIT: Status = _

Source

pub const CANCELED: Status = _

Source

pub const PEER_CLOSED: Status = _

Source

pub const NOT_FOUND: Status = _

Source

pub const ALREADY_EXISTS: Status = _

Source

pub const ALREADY_BOUND: Status = _

Source

pub const UNAVAILABLE: Status = _

Source

pub const ACCESS_DENIED: Status = _

Source

pub const IO: Status = _

Source

pub const IO_REFUSED: Status = _

Source

pub const IO_DATA_INTEGRITY: Status = _

Source

pub const IO_DATA_LOSS: Status = _

Source

pub const IO_NOT_PRESENT: Status = _

Source

pub const IO_OVERRUN: Status = _

Source

pub const IO_MISSED_DEADLINE: Status = _

Source

pub const IO_INVALID: Status = _

Source

pub const BAD_PATH: Status = _

Source

pub const NOT_DIR: Status = _

Source

pub const NOT_FILE: Status = _

Source

pub const FILE_BIG: Status = _

Source

pub const NO_SPACE: Status = _

Source

pub const NOT_EMPTY: Status = _

Source

pub const STOP: Status = _

Source

pub const NEXT: Status = _

Source

pub const ASYNC: Status = _

Source

pub const PROTOCOL_NOT_SUPPORTED: Status = _

Source

pub const ADDRESS_UNREACHABLE: Status = _

Source

pub const ADDRESS_IN_USE: Status = _

Source

pub const NOT_CONNECTED: Status = _

Source

pub const CONNECTION_REFUSED: Status = _

Source

pub const CONNECTION_RESET: Status = _

Source

pub const CONNECTION_ABORTED: Status = _

Source§

impl Status

Trait Implementations§

Source§

impl Clone for Status

Source§

fn clone(&self) -> Status

Returns a copy 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 Error for Status

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Status

Source§

fn from(err: Error) -> Status

Converts to this type from the input type.
Source§

impl From<ErrorKind> for Status

Source§

fn from(kind: ErrorKind) -> Status

Converts to this type from the input type.
Source§

impl From<NulError> for Status

Source§

fn from(_error: NulError) -> Status

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl Hash for Status

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Status

Source§

fn cmp(&self, other: &Status) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. 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 PartialOrd for Status

Source§

fn partial_cmp(&self, other: &Status) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. 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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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§

default 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.