Enum fs_mistrust::TrustedGroup
source · #[non_exhaustive]pub enum TrustedGroup {
None,
SelfNamed,
Id(u32),
Name(OsString),
}
Available on
target_family="unix"
and non-iOS and non-Android only.Expand description
A group that we can be configured to trust.
§Serde support
See the serde support
section in TrustedUser
. Additionally,
you can represent TrustedGroup::SelfNamed
with the string ":username"
or the map { special = ":username" }
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
We won’t treat any group as trusted
SelfNamed
We’ll treat any group with same name as the current user as trusted.
If there is no such group, we trust no group.
(This is the default.)
Id(u32)
We’ll treat a specific group ID as trusted.
Name(OsString)
We’ll treat a group with a specific name as trusted.
If there is no such group, we’ll report an error.
Trait Implementations§
source§impl Clone for TrustedGroup
impl Clone for TrustedGroup
source§fn clone(&self) -> TrustedGroup
fn clone(&self) -> TrustedGroup
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 TrustedGroup
impl Debug for TrustedGroup
source§impl Default for TrustedGroup
impl Default for TrustedGroup
source§fn default() -> TrustedGroup
fn default() -> TrustedGroup
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TrustedGroup
impl<'de> Deserialize<'de> for TrustedGroup
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&OsStr> for TrustedGroup
impl From<&OsStr> for TrustedGroup
source§fn from(val: &OsStr) -> TrustedGroup
fn from(val: &OsStr) -> TrustedGroup
Converts to this type from the input type.
source§impl From<&str> for TrustedGroup
impl From<&str> for TrustedGroup
source§fn from(val: &str) -> TrustedGroup
fn from(val: &str) -> TrustedGroup
Converts to this type from the input type.
source§impl From<OsString> for TrustedGroup
impl From<OsString> for TrustedGroup
source§fn from(val: OsString) -> TrustedGroup
fn from(val: OsString) -> TrustedGroup
Converts to this type from the input type.
source§impl From<String> for TrustedGroup
impl From<String> for TrustedGroup
source§fn from(val: String) -> TrustedGroup
fn from(val: String) -> TrustedGroup
Converts to this type from the input type.
source§impl From<u32> for TrustedGroup
impl From<u32> for TrustedGroup
source§impl Hash for TrustedGroup
impl Hash for TrustedGroup
source§impl PartialEq for TrustedGroup
impl PartialEq for TrustedGroup
source§fn eq(&self, other: &TrustedGroup) -> bool
fn eq(&self, other: &TrustedGroup) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TrustedGroup
impl Serialize for TrustedGroup
impl Eq for TrustedGroup
impl StructuralPartialEq for TrustedGroup
Auto Trait Implementations§
impl Freeze for TrustedGroup
impl RefUnwindSafe for TrustedGroup
impl Send for TrustedGroup
impl Sync for TrustedGroup
impl Unpin for TrustedGroup
impl UnwindSafe for TrustedGroup
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