Enum nix::unistd::SysconfVar

source ·
#[non_exhaustive]
#[repr(i32)]
pub enum SysconfVar {
Show 66 variants AIO_LISTIO_MAX = 23, AIO_MAX = 24, ARG_MAX = 0, ATEXIT_MAX = 87, BC_BASE_MAX = 36, BC_DIM_MAX = 37, BC_SCALE_MAX = 38, BC_STRING_MAX = 39, CHILD_MAX = 1, CLK_TCK = 2, COLL_WEIGHTS_MAX = 40, DELAYTIMER_MAX = 26, EXPR_NEST_MAX = 42, IOV_MAX = 60, LINE_MAX = 43, LOGIN_NAME_MAX = 71, NGROUPS_MAX = 3, GETGR_R_SIZE_MAX = 69, GETPW_R_SIZE_MAX = 70, MQ_OPEN_MAX = 27, MQ_PRIO_MAX = 28, OPEN_MAX = 4, _POSIX_ASYNCHRONOUS_IO = 12, _POSIX_FSYNC = 15, _POSIX_JOB_CONTROL = 7, _POSIX_MAPPED_FILES = 16, _POSIX_MEMLOCK = 17, _POSIX_MEMLOCK_RANGE = 18, _POSIX_MEMORY_PROTECTION = 19, _POSIX_MESSAGE_PASSING = 20, _POSIX_MONOTONIC_CLOCK = 149, _POSIX_PRIORITY_SCHEDULING = 10, _POSIX_SAVED_IDS = 8, _POSIX_SEMAPHORES = 21, _POSIX_SHARED_MEMORY_OBJECTS = 22, _POSIX_SYNCHRONIZED_IO = 14, _POSIX_THREAD_ATTR_STACKADDR = 77, _POSIX_THREAD_ATTR_STACKSIZE = 78, _POSIX_THREAD_PRIO_INHERIT = 80, _POSIX_THREAD_PRIO_PROTECT = 81, _POSIX_THREAD_PRIORITY_SCHEDULING = 79, _POSIX_THREAD_SAFE_FUNCTIONS = 68, _POSIX_THREADS = 67, _POSIX_TIMERS = 11, _POSIX_VERSION = 29, _POSIX2_C_BIND = 47, _POSIX2_C_DEV = 48, _POSIX2_CHAR_TERM = 95, _POSIX2_FORT_DEV = 49, _POSIX2_FORT_RUN = 50, _POSIX2_LOCALEDEF = 52, _POSIX2_SW_DEV = 51, _POSIX2_UPE = 97, _POSIX2_VERSION = 46, PAGE_SIZE = 30, PTHREAD_DESTRUCTOR_ITERATIONS = 73, PTHREAD_KEYS_MAX = 74, PTHREAD_STACK_MIN = 75, PTHREAD_THREADS_MAX = 76, RE_DUP_MAX = 44, SEM_NSEMS_MAX = 32, STREAM_MAX = 5, TIMER_MAX = 35, TTY_NAME_MAX = 72, TZNAME_MAX = 6, _XOPEN_SHM = 94,
}
Expand description

Variable names for sysconf

Nix uses the same naming convention for these variables as the getconf(1) utility. That is, SysconfVar variables have the same name as the abstract variables shown in the sysconf(3) man page. Usually, it’s the same as the C variable name without the leading _SC_.

All of these symbols are standardized by POSIX 1003.1-2008, but haven’t been implemented by all platforms.

§References

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AIO_LISTIO_MAX = 23

Maximum number of I/O operations in a single list I/O call supported by the implementation.

§

AIO_MAX = 24

Maximum number of outstanding asynchronous I/O operations supported by the implementation.

§

ARG_MAX = 0

Maximum length of argument to the exec functions including environment data.

§

ATEXIT_MAX = 87

Maximum number of functions that may be registered with atexit.

§

BC_BASE_MAX = 36

Maximum obase values allowed by the bc utility.

§

BC_DIM_MAX = 37

Maximum number of elements permitted in an array by the bc utility.

§

BC_SCALE_MAX = 38

Maximum scale value allowed by the bc utility.

§

BC_STRING_MAX = 39

Maximum length of a string constant accepted by the bc utility.

§

CHILD_MAX = 1

Maximum number of simultaneous processes per real user ID.

§

CLK_TCK = 2

§

COLL_WEIGHTS_MAX = 40

Maximum number of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file

§

DELAYTIMER_MAX = 26

Maximum number of timer expiration overruns.

§

EXPR_NEST_MAX = 42

Maximum number of expressions that can be nested within parentheses by the expr utility.

§

IOV_MAX = 60

Maximum number of iovec structures that one process has available for use with readv or writev.

§

LINE_MAX = 43

Unless otherwise noted, the maximum length, in bytes, of a utility’s input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing newline.

§

LOGIN_NAME_MAX = 71

Maximum length of a login name.

§

NGROUPS_MAX = 3

Maximum number of simultaneous supplementary group IDs per process.

§

GETGR_R_SIZE_MAX = 69

Initial size of getgrgid_r and getgrnam_r data buffers

§

GETPW_R_SIZE_MAX = 70

Initial size of getpwuid_r and getpwnam_r data buffers

§

MQ_OPEN_MAX = 27

The maximum number of open message queue descriptors a process may hold.

§

MQ_PRIO_MAX = 28

The maximum number of message priorities supported by the implementation.

§

OPEN_MAX = 4

A value one greater than the maximum value that the system may assign to a newly-created file descriptor.

§

_POSIX_ASYNCHRONOUS_IO = 12

The implementation supports asynchronous input and output.

§

_POSIX_FSYNC = 15

The implementation supports the File Synchronization option.

§

_POSIX_JOB_CONTROL = 7

The implementation supports job control.

§

_POSIX_MAPPED_FILES = 16

The implementation supports memory mapped Files.

§

_POSIX_MEMLOCK = 17

The implementation supports the Process Memory Locking option.

§

_POSIX_MEMLOCK_RANGE = 18

The implementation supports the Range Memory Locking option.

§

_POSIX_MEMORY_PROTECTION = 19

The implementation supports memory protection.

§

_POSIX_MESSAGE_PASSING = 20

The implementation supports the Message Passing option.

§

_POSIX_MONOTONIC_CLOCK = 149

The implementation supports the Monotonic Clock option.

§

_POSIX_PRIORITY_SCHEDULING = 10

The implementation supports the Process Scheduling option.

§

_POSIX_SAVED_IDS = 8

Each process has a saved set-user-ID and a saved set-group-ID.

§

_POSIX_SEMAPHORES = 21

The implementation supports semaphores.

§

_POSIX_SHARED_MEMORY_OBJECTS = 22

The implementation supports the Shared Memory Objects option.

§

_POSIX_SYNCHRONIZED_IO = 14

The implementation supports the Synchronized Input and Output option.

§

_POSIX_THREAD_ATTR_STACKADDR = 77

The implementation supports the Thread Stack Address Attribute option.

§

_POSIX_THREAD_ATTR_STACKSIZE = 78

The implementation supports the Thread Stack Size Attribute option.

§

_POSIX_THREAD_PRIO_INHERIT = 80

The implementation supports the Non-Robust Mutex Priority Inheritance option.

§

_POSIX_THREAD_PRIO_PROTECT = 81

The implementation supports the Non-Robust Mutex Priority Protection option.

§

_POSIX_THREAD_PRIORITY_SCHEDULING = 79

The implementation supports the Thread Execution Scheduling option.

§

_POSIX_THREAD_SAFE_FUNCTIONS = 68

The implementation supports thread-safe functions.

§

_POSIX_THREADS = 67

The implementation supports threads.

§

_POSIX_TIMERS = 11

The implementation supports timers.

§

_POSIX_VERSION = 29

Integer value indicating version of this standard (C-language binding) to which the implementation conforms. For implementations conforming to POSIX.1-2008, the value shall be 200809L.

§

_POSIX2_C_BIND = 47

The implementation supports the C-Language Binding option.

§

_POSIX2_C_DEV = 48

The implementation supports the C-Language Development Utilities option.

§

_POSIX2_CHAR_TERM = 95

The implementation supports the Terminal Characteristics option.

§

_POSIX2_FORT_DEV = 49

The implementation supports the FORTRAN Development Utilities option.

§

_POSIX2_FORT_RUN = 50

The implementation supports the FORTRAN Runtime Utilities option.

§

_POSIX2_LOCALEDEF = 52

The implementation supports the creation of locales by the localedef utility.

§

_POSIX2_SW_DEV = 51

The implementation supports the Software Development Utilities option.

§

_POSIX2_UPE = 97

The implementation supports the User Portability Utilities option.

§

_POSIX2_VERSION = 46

Integer value indicating version of the Shell and Utilities volume of POSIX.1 to which the implementation conforms.

§

PAGE_SIZE = 30

The size of a system page in bytes.

POSIX also defines an alias named PAGESIZE, but Rust does not allow two enum constants to have the same value, so nix omits PAGESIZE.

§

PTHREAD_DESTRUCTOR_ITERATIONS = 73

§

PTHREAD_KEYS_MAX = 74

§

PTHREAD_STACK_MIN = 75

§

PTHREAD_THREADS_MAX = 76

§

RE_DUP_MAX = 44

§

SEM_NSEMS_MAX = 32

§

STREAM_MAX = 5

§

TIMER_MAX = 35

§

TTY_NAME_MAX = 72

§

TZNAME_MAX = 6

§

_XOPEN_SHM = 94

The implementation supports the Issue 4, Version 2 Shared Memory Option Group.

Trait Implementations§

source§

impl Clone for SysconfVar

source§

fn clone(&self) -> SysconfVar

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 SysconfVar

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for SysconfVar

source§

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

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 PartialEq for SysconfVar

source§

fn eq(&self, other: &SysconfVar) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SysconfVar

source§

impl Eq for SysconfVar

source§

impl StructuralPartialEq for SysconfVar

Auto Trait Implementations§

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> 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,

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.