Enum conch_runtime::io::Permissions [−][src]
pub enum Permissions { Read, Write, ReadWrite, }
An indicator of the read/write permissions of an OS file primitive.
Variants
Read
A file was opened for reading only.
Write
A file was opened for writing only.
ReadWrite
A file was opened for both reading and writing.
Methods
impl Permissions
[src]
impl Permissions
pub fn readable(&self) -> bool
[src]
pub fn readable(&self) -> bool
Checks if read permissions are granted.
pub fn writable(&self) -> bool
[src]
pub fn writable(&self) -> bool
Checks if write permissions are granted.
pub fn open<P: AsRef<Path>>(self, path: P) -> Result<File>
[src]
pub fn open<P: AsRef<Path>>(self, path: P) -> Result<File>
Opens permissions as a file handle.
Trait Implementations
impl Debug for Permissions
[src]
impl Debug for Permissions
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Permissions
[src]
impl Copy for Permissions
impl Clone for Permissions
[src]
impl Clone for Permissions
fn clone(&self) -> Permissions
[src]
fn clone(&self) -> Permissions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Permissions
[src]
impl PartialEq for Permissions
fn eq(&self, other: &Permissions) -> bool
[src]
fn eq(&self, other: &Permissions) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for Permissions
[src]
impl Eq for Permissions
impl Into<OpenOptions> for Permissions
[src]
impl Into<OpenOptions> for Permissions
fn into(self) -> OpenOptions
[src]
fn into(self) -> OpenOptions
Performs the conversion.
impl Display for Permissions
[src]
impl Display for Permissions
Auto Trait Implementations
impl Send for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Sync for Permissions