Make cloudapi enums #[non_exhaustive]
This commit is contained in:
parent
ea505fd60b
commit
f541ab226c
1 changed files with 9 additions and 9 deletions
|
@ -121,6 +121,7 @@ include!("bitflags.rs");
|
|||
/// File or memory access pattern advisory information.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum advice {
|
||||
/// The application expects that it will not access the
|
||||
/// specified data in the near future.
|
||||
|
@ -140,12 +141,12 @@ pub enum advice {
|
|||
/// The application expects to access the specified data
|
||||
/// in the near future.
|
||||
WILLNEED = 6,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
/// Enumeration describing the kind of value stored in [`auxv`](struct.auxv.html).
|
||||
#[repr(u32)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum auxtype {
|
||||
/// Base address of the binary argument data provided to
|
||||
/// [`proc_exec()`](fn.proc_exec.html).
|
||||
|
@ -210,12 +211,12 @@ pub enum auxtype {
|
|||
SYSINFO_EHDR = 262,
|
||||
/// Thread ID of the initial thread of the process.
|
||||
TID = 261,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u32,
|
||||
}
|
||||
|
||||
/// Identifiers for clocks.
|
||||
#[repr(u32)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum clockid {
|
||||
/// The system-wide monotonic clock, which is defined as a
|
||||
/// clock measuring real time, whose value cannot be
|
||||
|
@ -232,7 +233,6 @@ pub enum clockid {
|
|||
REALTIME = 3,
|
||||
/// The CPU-time clock associated with the current thread.
|
||||
THREAD_CPUTIME_ID = 4,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u32,
|
||||
}
|
||||
|
||||
/// A userspace condition variable.
|
||||
|
@ -267,6 +267,7 @@ pub const DIRCOOKIE_START: dircookie = dircookie(0);
|
|||
/// exclusively or merely provided for alignment with POSIX.
|
||||
#[repr(u16)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum errno {
|
||||
/// No error occurred. System call completed successfully.
|
||||
SUCCESS = 0,
|
||||
|
@ -422,7 +423,6 @@ pub enum errno {
|
|||
XDEV = 75,
|
||||
/// Extension: Capabilities insufficient.
|
||||
NOTCAPABLE = 76,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u16,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
@ -438,6 +438,7 @@ bitflags! {
|
|||
/// Type of a subscription to an event or its occurrence.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum eventtype {
|
||||
/// The time value of clock [`subscription.union.clock.clock_id`](struct.subscription_clock.html#structfield.clock_id)
|
||||
/// has reached timestamp [`subscription.union.clock.timeout`](struct.subscription_clock.html#structfield.timeout).
|
||||
|
@ -463,7 +464,6 @@ pub enum eventtype {
|
|||
/// The process associated with process descriptor
|
||||
/// [`subscription.union.proc_terminate.fd`](struct.subscription_proc_terminate.html#structfield.fd) has terminated.
|
||||
PROC_TERMINATE = 7,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
/// Exit code generated by a process when exiting.
|
||||
|
@ -530,6 +530,7 @@ pub type filesize = u64;
|
|||
/// The type of a file descriptor or file.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum filetype {
|
||||
/// The type of the file descriptor or file is unknown or
|
||||
/// is different from any of the other types specified.
|
||||
|
@ -558,7 +559,6 @@ pub enum filetype {
|
|||
SOCKET_STREAM = 130,
|
||||
/// The file refers to a symbolic link inode.
|
||||
SYMBOLIC_LINK = 144,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
@ -847,12 +847,12 @@ bitflags! {
|
|||
/// memory.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum scope {
|
||||
/// The object is stored in private memory.
|
||||
PRIVATE = 4,
|
||||
/// The object is stored in shared memory.
|
||||
SHARED = 8,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
@ -878,6 +878,7 @@ bitflags! {
|
|||
/// Signal condition.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum signal {
|
||||
/// Process abort signal.
|
||||
///
|
||||
|
@ -983,7 +984,6 @@ pub enum signal {
|
|||
///
|
||||
/// Action: Terminates the process.
|
||||
XFSZ = 26,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
@ -1049,6 +1049,7 @@ pub type userdata = u64;
|
|||
/// should be set.
|
||||
#[repr(u8)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum whence {
|
||||
/// Seek relative to current position.
|
||||
CUR = 1,
|
||||
|
@ -1056,7 +1057,6 @@ pub enum whence {
|
|||
END = 2,
|
||||
/// Seek relative to start-of-file.
|
||||
SET = 3,
|
||||
#[doc(hidden)] _NonExhaustive = -1 as isize as u8,
|
||||
}
|
||||
|
||||
/// Auxiliary vector entry.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue