[][src]Struct users::Group

pub struct Group { /* fields omitted */ }

Information about a particular group.

For more information, see the module documentation.

Implementations

impl Group[src]

pub fn new<S: AsRef<OsStr> + ?Sized>(gid: gid_t, name: &S) -> Self[src]

Create a new Group with the given group ID and name, with the rest of the fields filled in with dummy values.

This method does not actually create a new group on the system — it should only be used for comparing groups in tests.

Examples

use users::Group;

let group = Group::new(102, "database");

pub fn gid(&self) -> gid_t[src]

Returns this group’s ID.

Examples

use users::Group;

let group = Group::new(102, "database");
assert_eq!(group.gid(), 102);

pub fn name(&self) -> &OsStr[src]

Returns this group’s name.

Examples

use std::ffi::OsStr;
use users::Group;

let group = Group::new(102, "database");
assert_eq!(group.name(), OsStr::new("database"));

Trait Implementations

impl Clone for Group[src]

impl Debug for Group[src]

impl GroupExt for Group[src]

Auto Trait Implementations

impl RefUnwindSafe for Group

impl Send for Group

impl Sync for Group

impl Unpin for Group

impl UnwindSafe for Group

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.