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
ReadA file was opened for reading only.
WriteA file was opened for writing only.
ReadWriteA file was opened for both reading and writing.
Methods
impl Permissions[src]
impl Permissionspub fn readable(&self) -> bool[src]
pub fn readable(&self) -> boolChecks if read permissions are granted.
pub fn writable(&self) -> bool[src]
pub fn writable(&self) -> boolChecks 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 Permissionsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for Permissions[src]
impl Copy for Permissionsimpl Clone for Permissions[src]
impl Clone for Permissionsfn clone(&self) -> Permissions[src]
fn clone(&self) -> PermissionsReturns 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 Permissionsfn eq(&self, other: &Permissions) -> bool[src]
fn eq(&self, other: &Permissions) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl Eq for Permissions[src]
impl Eq for Permissionsimpl Into<OpenOptions> for Permissions[src]
impl Into<OpenOptions> for Permissionsfn into(self) -> OpenOptions[src]
fn into(self) -> OpenOptionsPerforms the conversion.
impl Display for Permissions[src]
impl Display for PermissionsAuto Trait Implementations
impl Send for Permissions
impl Send for Permissionsimpl Sync for Permissions
impl Sync for Permissions