pub struct Permissions(/* private fields */);
Expand description
Representation of the various permissions on a file.
Implementations§
Source§impl Permissions
impl Permissions
Sourcepub fn readonly(&self) -> bool
pub fn readonly(&self) -> bool
Returns true
if these permissions describe a readonly (unwritable) file.
Sourcepub fn set_readonly(&mut self, readonly: bool)
pub fn set_readonly(&mut self, readonly: bool)
Set the readonly flag for this set of permissions.
This will not change the file’s permissions, only the in-memory representation.
Same with the std::fs
, if you want to change the file’s permissions, you should use
monoio::fs::set_permissions
(currently not support) or std::fs::set_permissions
.
Trait Implementations§
Source§impl Debug for Permissions
impl Debug for Permissions
Source§impl PermissionsExt for Permissions
impl PermissionsExt for Permissions
Source§fn set_mode(&mut self, mode: u32)
fn set_mode(&mut self, mode: u32)
Set the mode bits for this set of permissions.
This will not change the file’s permissions, only the in-memory representation.
Same with the std::fs
, if you want to change the file’s permissions, you should use
monoio::fs::set_permissions
(currently not support) or std::fs::set_permissions
.
Auto Trait Implementations§
impl Freeze for Permissions
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more