Struct users::Group [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,