[][src]Struct redox_users::Config

pub struct Config { /* fields omitted */ }

A generic configuration that allows fine control of an AllUsers or AllGroups.

auth_delay is not used by AllGroups

In most situations, Config::default will work just fine. The other fields are for finer control if it is required.

Example

use std::time::Duration;

let cfg = Config::default()
    .min_id(500)
    .max_id(1000)
    .auth_delay(Duration::from_secs(5));

Implementations

impl Config[src]

pub fn auth_delay(self, delay: Duration) -> Config[src]

Set the delay for a failed authentication. Default is 3 seconds.

pub fn min_id(self, id: usize) -> Config[src]

Set the smallest ID possible to use when finding an unused ID.

pub fn max_id(self, id: usize) -> Config[src]

Set the largest possible ID to use when finding an unused ID.

pub fn scheme(self, scheme: String) -> Config[src]

Set the scheme relative to which the AllUsers or AllGroups should be looking for its data files. This is a compromise between exposing implementation details and providing fine enough control over the behavior of this API.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

pub fn default() -> Config[src]

The default base scheme is file:.

The default auth delay is 3 seconds.

The default min and max ids are 1000 and 6000.

Auto Trait Implementations

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.