[−][src]Struct cap_primitives::fs::Permissions
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) -> Self
[src]
Constructs a new instance of Self
from the given std::fs::Permissions
.
pub fn into_std(self, file: &File) -> Result<Permissions>
[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 const 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]
pub fn clone(&self) -> Permissions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Permissions
[src]
impl Eq for Permissions
[src]
impl PartialEq<Permissions> for Permissions
[src]
pub fn eq(&self, other: &Permissions) -> bool
[src]
pub fn ne(&self, other: &Permissions) -> bool
[src]
impl StructuralEq for Permissions
[src]
impl StructuralPartialEq for Permissions
[src]
Auto Trait Implementations
impl RefUnwindSafe for Permissions
[src]
impl Send for Permissions
[src]
impl Sync for Permissions
[src]
impl Unpin for Permissions
[src]
impl UnwindSafe for Permissions
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,