Struct redox_users::Config
source · pub struct Config { /* private fields */ }
Expand description
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§
source§impl Config
impl Config
sourcepub fn auth_delay(self, delay: Duration) -> Config
pub fn auth_delay(self, delay: Duration) -> Config
Set the delay for a failed authentication. Default is 3 seconds.
sourcepub fn min_id(self, id: usize) -> Config
pub fn min_id(self, id: usize) -> Config
Set the smallest ID possible to use when finding an unused ID.
sourcepub fn max_id(self, id: usize) -> Config
pub fn max_id(self, id: usize) -> Config
Set the largest possible ID to use when finding an unused ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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