pub struct FingerResponseStructuredUserEntry {Show 14 fields
pub username: String,
pub full_name: String,
pub home_dir: PathBuf,
pub shell: PathBuf,
pub office: Option<String>,
pub office_phone: Option<String>,
pub home_phone: Option<String>,
pub never_logged_in: bool,
pub sessions: Vec<FingerResponseUserSession>,
pub forward_status: Option<String>,
pub mail_status: Option<MailStatus>,
pub pgp_key: Option<String>,
pub project: Option<String>,
pub plan: Option<String>,
}Fields§
§username: StringThe unix username of this user, as noted in passwd
full_name: StringThe full name of this user, as noted in passwd
home_dir: PathBufThe path to the home directory of this user, as noted in passwd
shell: PathBufThe path to the shell of this user, as noted in passwd
office: Option<String>Office location, if available
office_phone: Option<String>Office phone number, if available
home_phone: Option<String>Home phone number, if available
never_logged_in: boolWhether the user has never logged in to this host
sessions: Vec<FingerResponseUserSession>A list of user sessions, sourced from utmp entries
forward_status: Option<String>Contents of ~/.forward, if it exists
mail_status: Option<MailStatus>Whether the user has new or unread mail
pgp_key: Option<String>Contents of ~/.pgpkey, if it exists
project: Option<String>Contents of ~/.project, if it exists
plan: Option<String>Contents of ~/.plan, if it exists
Implementations§
Source§impl FingerResponseStructuredUserEntry
impl FingerResponseStructuredUserEntry
pub fn new( username: String, full_name: String, home_dir: PathBuf, shell: PathBuf, office: Option<String>, office_phone: Option<String>, home_phone: Option<String>, never_logged_in: bool, sessions: Vec<FingerResponseUserSession>, forward_status: Option<String>, mail_status: Option<MailStatus>, pgp_key: Option<String>, project: Option<String>, plan: Option<String>, ) -> Self
Sourcepub fn try_from_raw_finger_response(
response: &RawFingerResponse,
username: String,
) -> Result<Self>
pub fn try_from_raw_finger_response( response: &RawFingerResponse, username: String, ) -> Result<Self>
Try parsing a FingerResponseUserEntry from the text format used by bsd-finger.
pub fn classic_format(&self) -> String
Trait Implementations§
Source§impl Clone for FingerResponseStructuredUserEntry
impl Clone for FingerResponseStructuredUserEntry
Source§fn clone(&self) -> FingerResponseStructuredUserEntry
fn clone(&self) -> FingerResponseStructuredUserEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for FingerResponseStructuredUserEntry
impl<'de> Deserialize<'de> for FingerResponseStructuredUserEntry
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 PartialEq for FingerResponseStructuredUserEntry
impl PartialEq for FingerResponseStructuredUserEntry
Source§fn eq(&self, other: &FingerResponseStructuredUserEntry) -> bool
fn eq(&self, other: &FingerResponseStructuredUserEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FingerResponseStructuredUserEntry
impl StructuralPartialEq for FingerResponseStructuredUserEntry
Auto Trait Implementations§
impl Freeze for FingerResponseStructuredUserEntry
impl RefUnwindSafe for FingerResponseStructuredUserEntry
impl Send for FingerResponseStructuredUserEntry
impl Sync for FingerResponseStructuredUserEntry
impl Unpin for FingerResponseStructuredUserEntry
impl UnsafeUnpin for FingerResponseStructuredUserEntry
impl UnwindSafe for FingerResponseStructuredUserEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more