Struct cap_async_std::fs::Permissions [−][src]
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 const fn readonly(&self) -> bool
[src][−]
Returns true
if these permissions describe a readonly (unwritable) file.
This corresponds to std::fs::Permissions::readonly
.
pub fn set_readonly(&mut self, readonly: bool)
[src][−]
Modifies the readonly flag for this set of permissions.
This corresponds to std::fs::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
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,
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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,