Enum nix::unistd::SysconfVar

source ·
#[non_exhaustive]
#[repr(i32)]
pub enum SysconfVar {
Show 75 variants AIO_LISTIO_MAX = 18, AIO_MAX = 19, ARG_MAX = 1, ATEXIT_MAX = 76, BC_BASE_MAX = 54, BC_DIM_MAX = 55, BC_SCALE_MAX = 56, BC_STRING_MAX = 57, CHILD_MAX = 2, CLK_TCK = 3, COLL_WEIGHTS_MAX = 58, DELAYTIMER_MAX = 22, EXPR_NEST_MAX = 59, HOST_NAME_MAX = 735, IOV_MAX = 77, LINE_MAX = 60, LOGIN_NAME_MAX = 571, NGROUPS_MAX = 4, GETGR_R_SIZE_MAX = 569, GETPW_R_SIZE_MAX = 570, MQ_OPEN_MAX = 29, MQ_PRIO_MAX = 30, OPEN_MAX = 5, _POSIX_BARRIERS = 732, _POSIX_ASYNCHRONOUS_IO = 21, _POSIX_CLOCK_SELECTION = 733, _POSIX_CPUTIME = 734, _POSIX_FSYNC = 23, _POSIX_IPV6 = 762, _POSIX_JOB_CONTROL = 6, _POSIX_MAPPED_FILES = 24, _POSIX_MEMLOCK = 25, _POSIX_MEMLOCK_RANGE = 26, _POSIX_MEMORY_PROTECTION = 27, _POSIX_MESSAGE_PASSING = 28, _POSIX_MONOTONIC_CLOCK = 736, _POSIX_PRIORITIZED_IO = 31, _POSIX_PRIORITY_SCHEDULING = 32, _POSIX_RAW_SOCKETS = 763, _POSIX_READER_WRITER_LOCKS = 737, _POSIX_REGEXP = 738, _POSIX_SAVED_IDS = 7, _POSIX_SEMAPHORES = 35, _POSIX_SHARED_MEMORY_OBJECTS = 38, _POSIX_SYNCHRONIZED_IO = 42, _POSIX_THREAD_ATTR_STACKADDR = 577, _POSIX_THREAD_ATTR_STACKSIZE = 578, _POSIX_THREAD_PRIO_INHERIT = 580, _POSIX_THREAD_PRIO_PROTECT = 581, _POSIX_THREAD_PRIORITY_SCHEDULING = 579, _POSIX_THREAD_SAFE_FUNCTIONS = 583, _POSIX_THREADS = 576, _POSIX_TIMERS = 43, _POSIX_VERSION = 8, _POSIX2_C_BIND = 45, _POSIX2_C_DEV = 46, _POSIX2_CHAR_TERM = 66, _POSIX2_FORT_DEV = 48, _POSIX2_FORT_RUN = 49, _POSIX2_LOCALEDEF = 50, _POSIX2_SW_DEV = 51, _POSIX2_UPE = 52, _POSIX2_VERSION = 53, PAGE_SIZE = 11, PTHREAD_DESTRUCTOR_ITERATIONS = 568, PTHREAD_KEYS_MAX = 572, PTHREAD_STACK_MIN = 573, PTHREAD_THREADS_MAX = 574, RE_DUP_MAX = 61, SEM_NSEMS_MAX = 36, STREAM_MAX = 16, TIMER_MAX = 44, TTY_NAME_MAX = 575, TZNAME_MAX = 17, _XOPEN_SHM = 64,
}
Available on crate feature feature only.
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 = 18

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

§

AIO_MAX = 19

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

§

ARG_MAX = 1

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

§

ATEXIT_MAX = 76

Maximum number of functions that may be registered with atexit.

§

BC_BASE_MAX = 54

Maximum obase values allowed by the bc utility.

§

BC_DIM_MAX = 55

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

§

BC_SCALE_MAX = 56

Maximum scale value allowed by the bc utility.

§

BC_STRING_MAX = 57

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

§

CHILD_MAX = 2

Maximum number of simultaneous processes per real user ID.

§

CLK_TCK = 3

The frequency of the statistics clock in ticks per second.

§

COLL_WEIGHTS_MAX = 58

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

§

DELAYTIMER_MAX = 22

Maximum number of timer expiration overruns.

§

EXPR_NEST_MAX = 59

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

§

HOST_NAME_MAX = 735

Maximum length of a host name (not including the terminating null) as returned from the gethostname function

§

IOV_MAX = 77

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

§

LINE_MAX = 60

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 = 571

Maximum length of a login name.

§

NGROUPS_MAX = 4

Maximum number of simultaneous supplementary group IDs per process.

§

GETGR_R_SIZE_MAX = 569

Initial size of getgrgid_r and getgrnam_r data buffers

§

GETPW_R_SIZE_MAX = 570

Initial size of getpwuid_r and getpwnam_r data buffers

§

MQ_OPEN_MAX = 29

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

§

MQ_PRIO_MAX = 30

The maximum number of message priorities supported by the implementation.

§

OPEN_MAX = 5

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

§

_POSIX_BARRIERS = 732

The implementation supports barriers.

§

_POSIX_ASYNCHRONOUS_IO = 21

The implementation supports asynchronous input and output.

§

_POSIX_CLOCK_SELECTION = 733

The implementation supports clock selection.

§

_POSIX_CPUTIME = 734

The implementation supports the Process CPU-Time Clocks option.

§

_POSIX_FSYNC = 23

The implementation supports the File Synchronization option.

§

_POSIX_IPV6 = 762

The implementation supports the IPv6 option.

§

_POSIX_JOB_CONTROL = 6

The implementation supports job control.

§

_POSIX_MAPPED_FILES = 24

The implementation supports memory mapped Files.

§

_POSIX_MEMLOCK = 25

The implementation supports the Process Memory Locking option.

§

_POSIX_MEMLOCK_RANGE = 26

The implementation supports the Range Memory Locking option.

§

_POSIX_MEMORY_PROTECTION = 27

The implementation supports memory protection.

§

_POSIX_MESSAGE_PASSING = 28

The implementation supports the Message Passing option.

§

_POSIX_MONOTONIC_CLOCK = 736

The implementation supports the Monotonic Clock option.

§

_POSIX_PRIORITIZED_IO = 31

The implementation supports the Prioritized Input and Output option.

§

_POSIX_PRIORITY_SCHEDULING = 32

The implementation supports the Process Scheduling option.

§

_POSIX_RAW_SOCKETS = 763

The implementation supports the Raw Sockets option.

§

_POSIX_READER_WRITER_LOCKS = 737

The implementation supports read-write locks.

§

_POSIX_REGEXP = 738

The implementation supports the Regular Expression Handling option.

§

_POSIX_SAVED_IDS = 7

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

§

_POSIX_SEMAPHORES = 35

The implementation supports semaphores.

§

_POSIX_SHARED_MEMORY_OBJECTS = 38

The implementation supports the Shared Memory Objects option.

§

_POSIX_SYNCHRONIZED_IO = 42

The implementation supports the Synchronized Input and Output option.

§

_POSIX_THREAD_ATTR_STACKADDR = 577

The implementation supports the Thread Stack Address Attribute option.

§

_POSIX_THREAD_ATTR_STACKSIZE = 578

The implementation supports the Thread Stack Size Attribute option.

§

_POSIX_THREAD_PRIO_INHERIT = 580

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

§

_POSIX_THREAD_PRIO_PROTECT = 581

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

§

_POSIX_THREAD_PRIORITY_SCHEDULING = 579

The implementation supports the Thread Execution Scheduling option.

§

_POSIX_THREAD_SAFE_FUNCTIONS = 583

The implementation supports thread-safe functions.

§

_POSIX_THREADS = 576

The implementation supports threads.

§

_POSIX_TIMERS = 43

The implementation supports timers.

§

_POSIX_VERSION = 8

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 = 45

The implementation supports the C-Language Binding option.

§

_POSIX2_C_DEV = 46

The implementation supports the C-Language Development Utilities option.

§

_POSIX2_CHAR_TERM = 66

The implementation supports the Terminal Characteristics option.

§

_POSIX2_FORT_DEV = 48

The implementation supports the FORTRAN Development Utilities option.

§

_POSIX2_FORT_RUN = 49

The implementation supports the FORTRAN Runtime Utilities option.

§

_POSIX2_LOCALEDEF = 50

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 = 52

The implementation supports the User Portability Utilities option.

§

_POSIX2_VERSION = 53

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

§

PAGE_SIZE = 11

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 = 568

Maximum number of attempts made to destroy a thread’s thread-specific data values on thread exit.

§

PTHREAD_KEYS_MAX = 572

Maximum number of data keys that can be created by a process.

§

PTHREAD_STACK_MIN = 573

Minimum size in bytes of thread stack storage.

§

PTHREAD_THREADS_MAX = 574

Maximum number of threads that can be created per process.

§

RE_DUP_MAX = 61

The maximum number of repeated occurrences of a regular expression permitted when using interval notation.

§

SEM_NSEMS_MAX = 36

Maximum number of semaphores that a process may have.

§

STREAM_MAX = 16

The minimum maximum number of streams that a process may have open at any one time.

§

TIMER_MAX = 44

Maximum number of timers per process supported.

§

TTY_NAME_MAX = 575

Maximum length of terminal device name.

§

TZNAME_MAX = 17

The minimum maximum number of types supported for the name of a timezone.

§

_XOPEN_SHM = 64

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.