pub struct Permission_type(/* private fields */);
Expand description
Represents a permission.
The permission can be read, write, and execute.
§Examples
use File_system::Permission_type;
let read = Permission_type::Read_only;
let write = Permission_type::Write_only;
let execute = Permission_type::Execute_only;
assert!(read.Get_read() && !read.Get_write() && !read.Get_execute());
assert!(!write.Get_read() && write.Get_write() && !write.Get_execute());
assert!(!execute.Get_read() && !execute.Get_write() && execute.Get_execute());
Implementations§
Source§impl Permission_type
impl Permission_type
pub const Read_only: Self = _
pub const Write_only: Self = _
pub const Execute_only: Self = _
pub const Read_write: Self = _
pub const Write_execute: Self = _
pub const Read_execute: Self = _
pub const None: Self = _
pub const Full: Self = _
Sourcepub fn Set_execute(self, Execute: bool) -> Self
pub fn Set_execute(self, Execute: bool) -> Self
Sets the execute permission.
Sourcepub const fn Get_execute(&self) -> bool
pub const fn Get_execute(&self) -> bool
Gets the execute permission.
pub fn Include(&self, Other: Self) -> bool
Trait Implementations§
Source§impl Clone for Permission_type
impl Clone for Permission_type
Source§fn clone(&self) -> Permission_type
fn clone(&self) -> Permission_type
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Permission_type
impl Debug for Permission_type
Source§impl Display for Permission_type
impl Display for Permission_type
Source§impl PartialEq for Permission_type
impl PartialEq for Permission_type
impl Copy for Permission_type
impl Eq for Permission_type
impl StructuralPartialEq for Permission_type
Auto Trait Implementations§
impl Freeze for Permission_type
impl RefUnwindSafe for Permission_type
impl Send for Permission_type
impl Sync for Permission_type
impl Unpin for Permission_type
impl UnwindSafe for Permission_type
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