pub struct FilePermissions {
pub owner_read: bool,
pub owner_write: bool,
pub owner_exec: bool,
pub group_read: bool,
pub group_write: bool,
pub group_exec: bool,
pub other_read: bool,
pub other_write: bool,
pub other_exec: bool,
}Expand description
File permission bits (Unix-style)
Fields§
§owner_read: boolOwner read
owner_write: boolOwner write
owner_exec: boolOwner execute
group_read: boolGroup read
group_write: boolGroup write
group_exec: boolGroup execute
other_read: boolOther read
other_write: boolOther write
other_exec: boolOther execute
Implementations§
Source§impl FilePermissions
impl FilePermissions
Sourcepub fn executable() -> Self
pub fn executable() -> Self
Default executable permissions (755)
Sourcepub fn from_octal(mode: u32) -> Self
pub fn from_octal(mode: u32) -> Self
Convert from octal notation (e.g., 0o755)
Trait Implementations§
Source§impl Clone for FilePermissions
impl Clone for FilePermissions
Source§fn clone(&self) -> FilePermissions
fn clone(&self) -> FilePermissions
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilePermissions
impl Debug for FilePermissions
Source§impl Default for FilePermissions
impl Default for FilePermissions
Source§impl From<FilePermissions> for u32
impl From<FilePermissions> for u32
Source§fn from(perms: FilePermissions) -> Self
fn from(perms: FilePermissions) -> Self
Converts to this type from the input type.
Source§impl From<u32> for FilePermissions
impl From<u32> for FilePermissions
Source§impl PartialEq for FilePermissions
impl PartialEq for FilePermissions
impl Copy for FilePermissions
impl Eq for FilePermissions
impl StructuralPartialEq for FilePermissions
Auto Trait Implementations§
impl Freeze for FilePermissions
impl RefUnwindSafe for FilePermissions
impl Send for FilePermissions
impl Sync for FilePermissions
impl Unpin for FilePermissions
impl UnwindSafe for FilePermissions
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)