Enum fs_mistrust::TrustedUser
source · [−]Expand description
A user that we can be configured to trust.
Serde support
If this crate is build with the serde1
feature enabled, you can serialize
and deserialize this type from any of the following:
false
and the string":none"
correspond toTrustedUser::None
.- The string
":current"
and the map{ special = ":current" }
correspond toTrustedUser::Current
. - A numeric value (e.g.,
413
) and the map{ id = 413 }
correspond toTrustedUser::Id(413)
. - A string not starting with
:
(e.g., “jane”) and the map{ name = "jane" }
correspond toTrustedUser::Name("jane".into())
.
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 user as trusted.
Current
Treat the current user as trusted.
Id(u32)
Treat the user with a particular UID as trusted.
Name(OsString)
Treat a user with a particular name as trusted.
If there is no such user, we’ll report an error.
Trait Implementations
sourceimpl Clone for TrustedUser
impl Clone for TrustedUser
sourcefn clone(&self) -> TrustedUser
fn clone(&self) -> TrustedUser
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TrustedUser
impl Debug for TrustedUser
sourceimpl Default for TrustedUser
impl Default for TrustedUser
sourceimpl From<&'_ OsStr> for TrustedUser
impl From<&'_ OsStr> for TrustedUser
sourceimpl From<&'_ str> for TrustedUser
impl From<&'_ str> for TrustedUser
sourceimpl From<OsString> for TrustedUser
impl From<OsString> for TrustedUser
sourceimpl From<String> for TrustedUser
impl From<String> for TrustedUser
sourceimpl From<u32> for TrustedUser
impl From<u32> for TrustedUser
sourceimpl PartialEq<TrustedUser> for TrustedUser
impl PartialEq<TrustedUser> for TrustedUser
sourcefn eq(&self, other: &TrustedUser) -> bool
fn eq(&self, other: &TrustedUser) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TrustedUser) -> bool
fn ne(&self, other: &TrustedUser) -> bool
This method tests for !=
.
impl Eq for TrustedUser
impl StructuralEq for TrustedUser
impl StructuralPartialEq for TrustedUser
Auto Trait Implementations
impl RefUnwindSafe for TrustedUser
impl Send for TrustedUser
impl Sync for TrustedUser
impl Unpin for TrustedUser
impl UnwindSafe for TrustedUser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more