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())
.
Limitations
Non-UTF8 usernames cannot currently be represented in all serde formats. Notably, toml doesn’t support them.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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<'de> Deserialize<'de> for TrustedUser
impl<'de> Deserialize<'de> for TrustedUser
sourcefn 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
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 !=
.
sourceimpl Serialize for TrustedUser
impl Serialize for TrustedUser
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more