#[non_exhaustive]pub enum TrustedGroup {
None,
SelfNamed,
Id(u32),
Name(OsString),
}
target_family="unix"
and non-iOS and non-Android and non-tvOS 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
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>,
Source§impl From<&OsStr> for TrustedGroup
impl From<&OsStr> for TrustedGroup
Source§fn from(val: &OsStr) -> TrustedGroup
fn from(val: &OsStr) -> TrustedGroup
Source§impl From<&str> for TrustedGroup
impl From<&str> for TrustedGroup
Source§fn from(val: &str) -> TrustedGroup
fn from(val: &str) -> TrustedGroup
Source§impl From<OsString> for TrustedGroup
impl From<OsString> for TrustedGroup
Source§fn from(val: OsString) -> TrustedGroup
fn from(val: OsString) -> TrustedGroup
Source§impl From<String> for TrustedGroup
impl From<String> for TrustedGroup
Source§fn from(val: String) -> TrustedGroup
fn from(val: String) -> TrustedGroup
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§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
None
: 0 bytesSelfNamed
: 0 bytesId
: 12 bytesName
: 24 bytes