fidl_data_zx/
errors.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// DO NOT EDIT.
6// Generated from FIDL library `zx` by zither, a Fuchsia platform tool.
7
8#![allow(unused_imports)]
9
10/// Indicates an operation was successful.
11pub const OK: i32 = 0;
12
13/// The system encountered an otherwise unspecified error while performing the
14/// operation.
15pub const ERR_INTERNAL: i32 = -1;
16
17/// The operation is not implemented, supported, or enabled.
18pub const ERR_NOT_SUPPORTED: i32 = -2;
19
20/// The system was not able to allocate some resource needed for the operation.
21pub const ERR_NO_RESOURCES: i32 = -3;
22
23/// The system was not able to allocate memory needed for the operation.
24pub const ERR_NO_MEMORY: i32 = -4;
25
26/// The system call was interrupted, but should be retried. This should not be
27/// seen outside of the VDSO.
28pub const ERR_INTERNAL_INTR_RETRY: i32 = -6;
29
30/// An argument is invalid. For example, a null pointer when a null pointer is
31/// not permitted.
32pub const ERR_INVALID_ARGS: i32 = -10;
33
34/// A specified handle value does not refer to a handle.
35pub const ERR_BAD_HANDLE: i32 = -11;
36
37/// The subject of the operation is the wrong type to perform the operation.
38///
39/// For example: Attempting a message_read on a thread handle.
40pub const ERR_WRONG_TYPE: i32 = -12;
41
42/// The specified syscall number is invalid.
43pub const ERR_BAD_SYSCALL: i32 = -13;
44
45/// An argument is outside the valid range for this operation.
46pub const ERR_OUT_OF_RANGE: i32 = -14;
47
48/// The caller-provided buffer is too small for this operation.
49pub const ERR_BUFFER_TOO_SMALL: i32 = -15;
50
51/// The operation failed because the current state of the object does not allow
52/// it, or a precondition of the operation is not satisfied.
53pub const ERR_BAD_STATE: i32 = -20;
54
55/// The time limit for the operation elapsed before the operation completed.
56pub const ERR_TIMED_OUT: i32 = -21;
57
58/// The operation cannot be performed currently but potentially could succeed if
59/// the caller waits for a prerequisite to be satisfied, like waiting for a
60/// handle to be readable or writable.
61///
62/// Example: Attempting to read from a channel that has no messages waiting but
63/// has an open remote will return `ZX_ERR_SHOULD_WAIT`. In contrast, attempting
64/// to read from a channel that has no messages waiting and has a closed remote
65/// end will return `ZX_ERR_PEER_CLOSED`.
66pub const ERR_SHOULD_WAIT: i32 = -22;
67
68/// The in-progress operation, for example, a wait, has been canceled.
69pub const ERR_CANCELED: i32 = -23;
70
71/// The operation failed because the remote end of the subject of the operation
72/// was closed.
73pub const ERR_PEER_CLOSED: i32 = -24;
74
75/// The requested entity is not found.
76pub const ERR_NOT_FOUND: i32 = -25;
77
78/// An object with the specified identifier already exists.
79///
80/// Example: Attempting to create a file when a file already exists with that
81/// name.
82pub const ERR_ALREADY_EXISTS: i32 = -26;
83
84/// The operation failed because the named entity is already owned or controlled
85/// by another entity. The operation could succeed later if the current owner
86/// releases the entity.
87pub const ERR_ALREADY_BOUND: i32 = -27;
88
89/// The subject of the operation is currently unable to perform the operation.
90///
91/// This is used when there's no direct way for the caller to observe when the
92/// subject will be able to perform the operation and should thus retry.
93pub const ERR_UNAVAILABLE: i32 = -28;
94
95/// The caller did not have permission to perform the specified operation.
96pub const ERR_ACCESS_DENIED: i32 = -30;
97
98/// Otherwise-unspecified error occurred during I/O.
99pub const ERR_IO: i32 = -40;
100
101/// The entity the I/O operation is being performed on rejected the operation.
102///
103/// Example: an I2C device NAK'ing a transaction or a disk controller rejecting
104/// an invalid command, or a stalled USB endpoint.
105pub const ERR_IO_REFUSED: i32 = -41;
106
107/// The data in the operation failed an integrity check and is possibly
108/// corrupted.
109///
110/// Example: CRC or Parity error.
111pub const ERR_IO_DATA_INTEGRITY: i32 = -42;
112
113/// The data in the operation is currently unavailable and may be permanently
114/// lost.
115///
116/// Example: A disk block is irrecoverably damaged.
117pub const ERR_IO_DATA_LOSS: i32 = -43;
118
119/// The device is no longer available (has been unplugged from the system,
120/// powered down, or the driver has been unloaded).
121pub const ERR_IO_NOT_PRESENT: i32 = -44;
122
123/// More data was received from the device than expected.
124///
125/// Example: a USB "babble" error due to a device sending more data than the
126/// host queued to receive.
127pub const ERR_IO_OVERRUN: i32 = -45;
128
129/// An operation did not complete within the required timeframe.
130///
131/// Example: A USB isochronous transfer that failed to complete due to an
132/// overrun or underrun.
133pub const ERR_IO_MISSED_DEADLINE: i32 = -46;
134
135/// The data in the operation is invalid parameter or is out of range.
136///
137/// Example: A USB transfer that failed to complete with TRB Error
138pub const ERR_IO_INVALID: i32 = -47;
139
140/// Path name is too long.
141pub const ERR_BAD_PATH: i32 = -50;
142
143/// The object is not a directory or does not support directory operations.
144///
145/// Example: Attempted to open a file as a directory or attempted to do
146/// directory operations on a file.
147pub const ERR_NOT_DIR: i32 = -51;
148
149/// Object is not a regular file.
150pub const ERR_NOT_FILE: i32 = -52;
151
152/// This operation would cause a file to exceed a filesystem-specific size
153/// limit.
154pub const ERR_FILE_BIG: i32 = -53;
155
156/// The filesystem or device space is exhausted.
157pub const ERR_NO_SPACE: i32 = -54;
158
159/// The directory is not empty for an operation that requires it to be empty.
160///
161/// For example, non-recursively deleting a directory with files still in it.
162pub const ERR_NOT_EMPTY: i32 = -55;
163
164/// An indicate to not call again.
165///
166/// The flow control values `ZX_ERR_STOP`, `ZX_ERR_NEXT`, and `ZX_ERR_ASYNC` are
167/// not errors and will never be returned by a system call or public API. They
168/// allow callbacks to request their caller perform some other operation.
169///
170/// For example, a callback might be called on every event until it returns
171/// something other than `ZX_OK`. This status allows differentiation between
172/// "stop due to an error" and "stop because work is done."
173pub const ERR_STOP: i32 = -60;
174
175/// Advance to the next item.
176///
177/// The flow control values `ZX_ERR_STOP`, `ZX_ERR_NEXT`, and `ZX_ERR_ASYNC` are
178/// not errors and will never be returned by a system call or public API. They
179/// allow callbacks to request their caller perform some other operation.
180///
181/// For example, a callback could use this value to indicate it did not consume
182/// an item passed to it, but by choice, not due to an error condition.
183pub const ERR_NEXT: i32 = -61;
184
185/// Ownership of the item has moved to an asynchronous worker.
186///
187/// The flow control values `ZX_ERR_STOP`, `ZX_ERR_NEXT`, and `ZX_ERR_ASYNC` are
188/// not errors and will never be returned by a system call or public API. They
189/// allow callbacks to request their caller perform some other operation.
190///
191/// Unlike `ZX_ERR_STOP`, which implies that iteration on an object
192/// should stop, and `ZX_ERR_NEXT`, which implies that iteration
193/// should continue to the next item, `ZX_ERR_ASYNC` implies
194/// that an asynchronous worker is responsible for continuing iteration.
195///
196/// For example, a callback will be called on every event, but one event needs
197/// to handle some work asynchronously before it can continue. `ZX_ERR_ASYNC`
198/// implies the worker is responsible for resuming iteration once its work has
199/// completed.
200pub const ERR_ASYNC: i32 = -62;
201
202/// The specified protocol is not supported.
203pub const ERR_PROTOCOL_NOT_SUPPORTED: i32 = -70;
204
205/// The host is unreachable.
206pub const ERR_ADDRESS_UNREACHABLE: i32 = -71;
207
208/// Address is being used by someone else.
209pub const ERR_ADDRESS_IN_USE: i32 = -72;
210
211/// The socket is not connected.
212pub const ERR_NOT_CONNECTED: i32 = -73;
213
214/// The remote peer rejected the connection.
215pub const ERR_CONNECTION_REFUSED: i32 = -74;
216
217/// The connection was reset.
218pub const ERR_CONNECTION_RESET: i32 = -75;
219
220/// The connection was aborted.
221pub const ERR_CONNECTION_ABORTED: i32 = -76;
222
223/// A task was killed during an operation. This is a private error that should
224/// not be seen outside of the VDSO.
225pub const ERR_INTERNAL_INTR_KILLED: i32 = -502;