Skip to main content

ModePath

Trait ModePath 

Source
pub trait ModePath {
    // Required methods
    fn mode(&self) -> Result<Mode, Error>;
    fn set_mode<'s, M: Into<SetMode<'s>>>(
        &self,
        mode: M,
    ) -> Result<u32, ModeError>;
}
Expand description

Extension methods for objects that can reference as Path.

Required Methods§

Source

fn mode(&self) -> Result<Mode, Error>

Constructs Mode from mode value of the file.

See Mode::from_path for details.

Source

fn set_mode<'s, M: Into<SetMode<'s>>>(&self, mode: M) -> Result<u32, ModeError>

Sets the mode of the file, represented by this path, by applying the mode changes to its current mode.

See Mode::set_mode_path for details.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: AsRef<Path>> ModePath for T