Struct cloudabi::rights []

#[repr(C)]
pub struct rights { /* fields omitted */ }

File descriptor rights, determining which actions may be performed.

Methods

impl rights

FD_DATASYNC: rights = rights{bits: 1,}

The right to invoke fd_datasync().

If FILE_OPEN is set, includes the right to invoke file_open() with DSYNC.

FD_READ: rights = rights{bits: 2,}

The right to invoke fd_read() and sock_recv().

If MEM_MAP is set, includes the right to invoke mem_map() with memory protection option READ.

If FD_SEEK is set, includes the right to invoke fd_pread().

FD_SEEK: rights = rights{bits: 4,}

The right to invoke fd_seek(). This flag implies FD_TELL.

FD_STAT_PUT_FLAGS: rights = rights{bits: 8,}

The right to invoke fd_stat_put() with FLAGS.

FD_SYNC: rights = rights{bits: 16,}

The right to invoke fd_sync().

If FILE_OPEN is set, includes the right to invoke file_open() with RSYNC and DSYNC.

FD_TELL: rights = rights{bits: 32,}

The right to invoke fd_seek() in such a way that the file offset remains unaltered (i.e., CUR with offset zero).

FD_WRITE: rights = rights{bits: 64,}

The right to invoke fd_write() and sock_send().

If MEM_MAP is set, includes the right to invoke mem_map() with memory protection option WRITE.

If FD_SEEK is set, includes the right to invoke fd_pwrite().

FILE_ADVISE: rights = rights{bits: 128,}

The right to invoke file_advise().

FILE_ALLOCATE: rights = rights{bits: 256,}

The right to invoke file_allocate().

FILE_CREATE_DIRECTORY: rights = rights{bits: 512,}

The right to invoke file_create() with DIRECTORY.

FILE_CREATE_FILE: rights = rights{bits: 1024,}

If FILE_OPEN is set, the right to invoke file_open() with CREAT.

FILE_LINK_SOURCE: rights = rights{bits: 4096,}

The right to invoke file_link() with the file descriptor as the source directory.

FILE_LINK_TARGET: rights = rights{bits: 8192,}

The right to invoke file_link() with the file descriptor as the target directory.

FILE_OPEN: rights = rights{bits: 16384,}

The right to invoke file_open().

FILE_READDIR: rights = rights{bits: 32768,}

The right to invoke file_readdir().

FILE_READLINK: rights = rights{bits: 65536,}

The right to invoke file_readlink().

FILE_RENAME_SOURCE: rights = rights{bits: 131072,}

The right to invoke file_rename() with the file descriptor as the source directory.

FILE_RENAME_TARGET: rights = rights{bits: 262144,}

The right to invoke file_rename() with the file descriptor as the target directory.

FILE_STAT_FGET: rights = rights{bits: 524288,}

The right to invoke file_stat_fget().

FILE_STAT_FPUT_SIZE: rights = rights{bits: 1048576,}

The right to invoke file_stat_fput() with SIZE.

If FILE_OPEN is set, includes the right to invoke file_open() with TRUNC.

FILE_STAT_FPUT_TIMES: rights = rights{bits: 2097152,}

The right to invoke file_stat_fput() with ATIM, ATIM_NOW, MTIM, and MTIM_NOW.

FILE_STAT_GET: rights = rights{bits: 4194304,}

The right to invoke file_stat_get().

FILE_STAT_PUT_TIMES: rights = rights{bits: 8388608,}

The right to invoke file_stat_put() with ATIM, ATIM_NOW, MTIM, and MTIM_NOW.

FILE_SYMLINK: rights = rights{bits: 16777216,}

The right to invoke file_symlink().

FILE_UNLINK: rights = rights{bits: 33554432,}

The right to invoke file_unlink().

MEM_MAP: rights = rights{bits: 67108864,}

The right to invoke mem_map() with mprot set to zero.

MEM_MAP_EXEC: rights = rights{bits: 134217728,}

If MEM_MAP is set, the right to invoke mem_map() with EXEC.

POLL_FD_READWRITE: rights = rights{bits: 268435456,}

If FD_READ is set, includes the right to invoke poll() to subscribe to FD_READ.

If FD_WRITE is set, includes the right to invoke poll() to subscribe to FD_WRITE.

POLL_PROC_TERMINATE: rights = rights{bits: 1073741824,}

The right to invoke poll() to subscribe to PROC_TERMINATE.

PROC_EXEC: rights = rights{bits: 4294967296,}

The right to invoke proc_exec().

SOCK_SHUTDOWN: rights = rights{bits: 549755813888,}

The right to invoke sock_shutdown().

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true all of the flags in other are contained within self.

Inserts the specified flags in-place.

Removes the specified flags in-place.

Toggles the specified flags in-place.

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Copy for rights

impl PartialEq for rights

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for rights

impl Clone for rights

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd for rights

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for rights

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for rights

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for rights

Formats the value using the given formatter.

impl Binary for rights

Formats the value using the given formatter.

impl Octal for rights

Formats the value using the given formatter.

impl LowerHex for rights

Formats the value using the given formatter.

impl UpperHex for rights

Formats the value using the given formatter.

impl BitOr for rights

The resulting type after applying the | operator.

Returns the union of the two sets of flags.

impl BitOrAssign for rights

Adds the set of flags.

impl BitXor for rights

The resulting type after applying the ^ operator.

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign for rights

Toggles the set of flags.

impl BitAnd for rights

The resulting type after applying the & operator.

Returns the intersection between the two sets of flags.

impl BitAndAssign for rights

Disables all flags disabled in the set.

impl Sub for rights

The resulting type after applying the - operator.

Returns the set difference of the two sets of flags.

impl SubAssign for rights

Disables all flags enabled in the set.

impl Not for rights

The resulting type after applying the ! operator.

Returns the complement of this set of flags.

impl Extend<rights> for rights

Extends a collection with the contents of an iterator. Read more

impl FromIterator<rights> for rights

Creates a value from an iterator. Read more