Enum zircon_object::ZxError
source · [−]#[repr(i32)]
pub enum ZxError {
Show 46 variants
OK,
INTERNAL,
NOT_SUPPORTED,
NO_RESOURCES,
NO_MEMORY,
INTERNAL_INTR_RETRY,
INVALID_ARGS,
BAD_HANDLE,
WRONG_TYPE,
BAD_SYSCALL,
OUT_OF_RANGE,
BUFFER_TOO_SMALL,
BAD_STATE,
TIMED_OUT,
SHOULD_WAIT,
CANCELED,
PEER_CLOSED,
NOT_FOUND,
ALREADY_EXISTS,
ALREADY_BOUND,
UNAVAILABLE,
ACCESS_DENIED,
IO,
IO_REFUSED,
IO_DATA_INTEGRITY,
IO_DATA_LOSS,
IO_NOT_PRESENT,
IO_OVERRUN,
IO_MISSED_DEADLINE,
IO_INVALID,
BAD_PATH,
NOT_DIR,
NOT_FILE,
FILE_BIG,
NO_SPACE,
NOT_EMPTY,
STOP,
NEXT,
ASYNC,
PROTOCOL_NOT_SUPPORTED,
ADDRESS_UNREACHABLE,
ADDRESS_IN_USE,
NOT_CONNECTED,
CONNECTION_REFUSED,
CONNECTION_RESET,
CONNECTION_ABORTED,
}
Expand description
Zircon statuses are signed 32 bit integers. The space of values is divided as follows:
- The zero value is for the OK status.
- Negative values are defined by the system, in this file.
- Positive values are reserved for protocol-specific error values, and will never be defined by the system.
Variants
OK
Success.
INTERNAL
The system encountered an otherwise unspecified error while performing the operation.
NOT_SUPPORTED
The operation is not implemented, supported, or enabled.
NO_RESOURCES
The system was not able to allocate some resource needed for the operation.
NO_MEMORY
The system was not able to allocate memory needed for the operation.
INTERNAL_INTR_RETRY
The system call was interrupted, but should be retried. This should not be seen outside of the VDSO.
INVALID_ARGS
an argument is invalid, ex. null pointer
BAD_HANDLE
A specified handle value does not refer to a handle.
WRONG_TYPE
The subject of the operation is the wrong type to perform the operation. Example: Attempting a message_read on a thread handle.
BAD_SYSCALL
The specified syscall number is invalid.
OUT_OF_RANGE
An argument is outside the valid range for this operation.
BUFFER_TOO_SMALL
A caller provided buffer is too small for this operation.
BAD_STATE
operation failed because the current state of the object does not allow it, or a precondition of the operation is not satisfied
TIMED_OUT
The time limit for the operation elapsed before the operation completed.
SHOULD_WAIT
The operation cannot be performed currently but potentially could succeed if the caller waits for a prerequisite to be satisfied, for example waiting for a handle to be readable or writable. Example: Attempting to read from a channel that has no messages waiting but has an open remote will return ZX_ERR_SHOULD_WAIT. Attempting to read from a channel that has no messages waiting and has a closed remote end will return ZX_ERR_PEER_CLOSED.
CANCELED
The in-progress operation (e.g. a wait) has been canceled.
PEER_CLOSED
The operation failed because the remote end of the subject of the operation was closed.
NOT_FOUND
The requested entity is not found.
ALREADY_EXISTS
An object with the specified identifier already exists. Example: Attempting to create a file when a file already exists with that name.
ALREADY_BOUND
The operation failed because the named entity is already owned or controlled by another entity. The operation could succeed later if the current owner releases the entity.
UNAVAILABLE
The subject of the operation is currently unable to perform the operation. Note: This is used when there’s no direct way for the caller to observe when the subject will be able to perform the operation and should thus retry.
ACCESS_DENIED
The caller did not have permission to perform the specified operation.
IO
Otherwise unspecified error occurred during I/O.
IO_REFUSED
The entity the I/O operation is being performed on rejected the operation. Example: an I2C device NAK’ing a transaction or a disk controller rejecting an invalid command, or a stalled USB endpoint.
IO_DATA_INTEGRITY
The data in the operation failed an integrity check and is possibly corrupted. Example: CRC or Parity error.
IO_DATA_LOSS
The data in the operation is currently unavailable and may be permanently lost. Example: A disk block is irrecoverably damaged.
IO_NOT_PRESENT
The device is no longer available (has been unplugged from the system, powered down, or the driver has been unloaded,
IO_OVERRUN
More data was received from the device than expected. Example: a USB “babble” error due to a device sending more data than the host queued to receive.
IO_MISSED_DEADLINE
An operation did not complete within the required timeframe. Example: A USB isochronous transfer that failed to complete due to an overrun or underrun.
IO_INVALID
The data in the operation is invalid parameter or is out of range. Example: A USB transfer that failed to complete with TRB Error
BAD_PATH
Path name is too long.
NOT_DIR
Object is not a directory or does not support directory operations. Example: Attempted to open a file as a directory or attempted to do directory operations on a file.
NOT_FILE
Object is not a regular file.
FILE_BIG
This operation would cause a file to exceed a filesystem-specific size limit
NO_SPACE
Filesystem or device space is exhausted.
NOT_EMPTY
Directory is not empty.
STOP
Do not call again. Example: A notification callback will be called on every event until it returns something other than ZX_OK. This status allows differentiation between “stop due to an error” and “stop because the work is done.”
NEXT
Advance to the next item. Example: A notification callback will use this response to indicate it did not “consume” an item passed to it, but by choice, not due to an error condition.
ASYNC
Ownership of the item has moved to an asynchronous worker.
Unlike ZX_ERR_STOP, which implies that iteration on an object should stop, and ZX_ERR_NEXT, which implies that iteration should continue to the next item, ZX_ERR_ASYNC implies that an asynchronous worker is responsible for continuing iteration.
Example: A notification callback will be called on every event, but one event needs to handle some work asynchronously before it can continue. ZX_ERR_ASYNC implies the worker is responsible for resuming iteration once its work has completed.
PROTOCOL_NOT_SUPPORTED
Specified protocol is not supported.
ADDRESS_UNREACHABLE
Host is unreachable.
ADDRESS_IN_USE
Address is being used by someone else.
NOT_CONNECTED
Socket is not connected.
CONNECTION_REFUSED
Remote peer rejected the connection.
CONNECTION_RESET
Connection was reset.
CONNECTION_ABORTED
Connection was aborted.
Trait Implementations
impl Copy for ZxError
impl Eq for ZxError
impl StructuralEq for ZxError
impl StructuralPartialEq for ZxError
Auto Trait Implementations
impl RefUnwindSafe for ZxError
impl Send for ZxError
impl Sync for ZxError
impl Unpin for ZxError
impl UnwindSafe for ZxError
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> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.