[][src]Enum conch_runtime::io::Permissions

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]

pub fn readable(&self) -> bool[src]

Checks if read permissions are granted.

pub fn writable(&self) -> bool[src]

Checks if write permissions are granted.

pub fn open<P: AsRef<Path>>(self, path: P) -> Result<File>[src]

Opens permissions as a file handle.

Trait Implementations

impl Eq for Permissions[src]

impl Into<OpenOptions> for Permissions[src]

impl PartialEq<Permissions> for Permissions[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Copy for Permissions[src]

impl Clone for Permissions[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Permissions[src]

impl Display for Permissions[src]

Auto Trait Implementations

impl Send for Permissions

impl Sync for Permissions

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T