[][src]Struct cap_std::fs::Permissions

pub struct Permissions { /* fields omitted */ }

Representation of the various permissions on a file.

This corresponds to std::fs::Permissions.

We need to define our own version because the libstd `Permissions` doesn't have a public constructor that we can use.

Implementations

impl Permissions[src]

pub fn from_std(std: Permissions) -> Permissions[src]

Constructs a new instance of Self from the given std::fs::Permissions.

pub fn into_std(self, file: &File) -> Result<Permissions, Error>[src]

Consumes self and produces a new instance of std::fs::Permissions.

The `file` parameter works around the fact that we can't construct a `Permissions` object ourselves on Windows.

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

Returns true if these permissions describe a readonly (unwritable) file.

This corresponds to Permissions::readonly.

pub fn set_readonly(&mut self, readonly: bool)[src]

Modifies the readonly flag for this set of permissions.

This corresponds to Permissions::set_readonly.

Trait Implementations

impl Clone for Permissions[src]

impl Debug for Permissions[src]

impl Eq for Permissions[src]

impl PartialEq<Permissions> for Permissions[src]

impl PermissionsExt for Permissions[src]

impl StructuralEq for Permissions[src]

impl StructuralPartialEq for Permissions[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.