#[repr(i32)]pub enum Permission {
Undefined = 0,
UserRead = 256,
UserWrite = 128,
UserExecute = 64,
GroupRead = 32,
GroupWrite = 16,
GroupExecute = 8,
OthersRead = 4,
OthersWrite = 2,
OthersExecute = 1,
}Expand description
Available parameters’ permissions. Different users/groups may require access to different and/or protected parts of the parameter tree. Permission flags allow fine-tuning access levels of the groups.
The Motorcortex permissions structure is similar to that of Unix file permissions. Permissions are represented either in symbolic notation or in octal notation. (Note: User rights are not yet implemented, instead use Group rights)
For example:
––––– (0000): no permission
-rwx—— (0700): read, write, & execute only for owner (Note: currently not implemented, user group flags instead)
-rwxrwx— (0770): read, write, & execute for owner and group (Note: execute flag is used as a permission to open folders)
-rwxrwxr-x (0775): read, write, & execute for owner and group, read & execute for all others.
-rwxrwxrwx (0777): full access
Variants§
Undefined = 0
UserRead = 256
owner user read -r––––
UserWrite = 128
owner user write –w—––
UserExecute = 64
owner user execute —e——
GroupRead = 32
owner group read ––r—–
GroupWrite = 16
owner group write —–w––
GroupExecute = 8
owner group execute ——e—
OthersRead = 4
other users read —––r–
OthersWrite = 2
other users write ––––w-
OthersExecute = 1
other users ———e
Implementations§
Source§impl Permission
impl Permission
Source§impl Permission
impl Permission
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for Permission
impl Clone for Permission
Source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Permission
Source§impl Debug for Permission
impl Debug for Permission
Source§impl Default for Permission
impl Default for Permission
Source§fn default() -> Permission
fn default() -> Permission
impl Eq for Permission
Source§impl From<Permission> for i32
impl From<Permission> for i32
Source§fn from(value: Permission) -> i32
fn from(value: Permission) -> i32
Source§impl Hash for Permission
impl Hash for Permission
Source§impl Ord for Permission
impl Ord for Permission
Source§fn cmp(&self, other: &Permission) -> Ordering
fn cmp(&self, other: &Permission) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Permission
impl PartialEq for Permission
Source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
self and other values to be equal, and is used by ==.