From 5000fba6e73d01af1a122c53e9c87c0d962304eb Mon Sep 17 00:00:00 2001 From: Dietrich Date: Wed, 30 Sep 2020 18:23:44 +0200 Subject: [PATCH] doc update for enum Gecos --- src/passwd.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/passwd.rs b/src/passwd.rs index cf62447..8f8f372 100644 --- a/src/passwd.rs +++ b/src/passwd.rs @@ -37,7 +37,12 @@ pub struct Uid { pub struct Gid { gid: u32, } - +/// The gecos field of a user. +/// +/// In the `/etc/passwd` file this field is a `,` sepparated list of items. +/// The first 4 values are more or less standardised to be full name, room, phone at work and phone at home. After that there can be some extra fields often containing the emailadress and even additional information. +/// +/// This enum represents the first 4 values by name and adds the other values to a list of strings [`Gecos::Detail`]. If only one field is found and no `,` at all this value is used as a human readable comment [`Gecos::Simple`]. #[derive(Debug, PartialEq, Eq)] pub enum Gecos<'a> { Detail {