Skip to main content

FileAccessMask

Struct FileAccessMask 

Source
pub struct FileAccessMask(pub u32);
Expand description

File access rights mask (32-bit, from MS-SMB2 2.2.13.1).

Tuple Fields§

§0: u32

Implementations§

Source§

impl FileAccessMask

Source

pub const FILE_READ_DATA: u32 = 0x0000_0001

Read data from the file.

Source

pub const FILE_WRITE_DATA: u32 = 0x0000_0002

Write data to the file.

Source

pub const FILE_APPEND_DATA: u32 = 0x0000_0004

Append data to the file.

Source

pub const FILE_READ_EA: u32 = 0x0000_0008

Read extended attributes.

Source

pub const FILE_WRITE_EA: u32 = 0x0000_0010

Write extended attributes.

Source

pub const FILE_EXECUTE: u32 = 0x0000_0020

Execute the file.

Source

pub const FILE_READ_ATTRIBUTES: u32 = 0x0000_0080

Read file attributes.

Source

pub const FILE_WRITE_ATTRIBUTES: u32 = 0x0000_0100

Write file attributes.

Source

pub const DELETE: u32 = 0x0001_0000

Delete the object.

Source

pub const READ_CONTROL: u32 = 0x0002_0000

Read the security descriptor.

Source

pub const WRITE_DAC: u32 = 0x0004_0000

Modify the DACL.

Source

pub const WRITE_OWNER: u32 = 0x0008_0000

Change the owner.

Source

pub const SYNCHRONIZE: u32 = 0x0010_0000

Synchronize access.

Source

pub const MAXIMUM_ALLOWED: u32 = 0x0200_0000

Request maximum allowed access.

Source

pub const GENERIC_ALL: u32 = 0x1000_0000

All possible access rights.

Source

pub const GENERIC_EXECUTE: u32 = 0x2000_0000

Execute access.

Source

pub const GENERIC_WRITE: u32 = 0x4000_0000

Write access.

Source

pub const GENERIC_READ: u32 = 0x8000_0000

Read access.

Source§

impl FileAccessMask

Source

pub const fn new(raw: u32) -> Self

Create a new flags value from a raw integer.

Source

pub const fn bits(&self) -> u32

Return the raw bits.

Source

pub const fn contains(&self, flag: u32) -> bool

Check whether a particular flag bit is set.

Source

pub fn set(&mut self, flag: u32)

Set a flag bit.

Source

pub fn clear(&mut self, flag: u32)

Clear a flag bit.

Trait Implementations§

Source§

impl BitAnd for FileAccessMask

Source§

type Output = FileAccessMask

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self

Performs the & operation. Read more
Source§

impl BitOr for FileAccessMask

Source§

type Output = FileAccessMask

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
Source§

impl BitOrAssign for FileAccessMask

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl Clone for FileAccessMask

Source§

fn clone(&self) -> FileAccessMask

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileAccessMask

Source§

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

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

impl Default for FileAccessMask

Source§

fn default() -> FileAccessMask

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FileAccessMask

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FileAccessMask

Source§

impl Eq for FileAccessMask

Source§

impl StructuralPartialEq for FileAccessMask

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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

Source§

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

Source§

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.