#[non_exhaustive]pub struct BasicLevel {
pub conditions: Vec<Condition>,
pub combining_function: ConditionCombiningFunction,
/* private fields */
}Expand description
BasicLevel is an AccessLevel using a set of recommended features.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.conditions: Vec<Condition>Required. A list of requirements for the AccessLevel to be granted.
combining_function: ConditionCombiningFunctionHow the conditions list should be combined to determine if a request is
granted this AccessLevel. If AND is used, each Condition in
conditions must be satisfied for the AccessLevel to be applied. If OR
is used, at least one Condition in conditions must be satisfied for the
AccessLevel to be applied. Default behavior is AND.
Implementations§
Source§impl BasicLevel
impl BasicLevel
pub fn new() -> Self
Sourcepub fn set_conditions<T, V>(self, v: T) -> Self
pub fn set_conditions<T, V>(self, v: T) -> Self
Sets the value of conditions.
Sourcepub fn set_combining_function<T: Into<ConditionCombiningFunction>>(
self,
v: T,
) -> Self
pub fn set_combining_function<T: Into<ConditionCombiningFunction>>( self, v: T, ) -> Self
Sets the value of combining_function.
Trait Implementations§
Source§impl Clone for BasicLevel
impl Clone for BasicLevel
Source§fn clone(&self) -> BasicLevel
fn clone(&self) -> BasicLevel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicLevel
impl Debug for BasicLevel
Source§impl Default for BasicLevel
impl Default for BasicLevel
Source§fn default() -> BasicLevel
fn default() -> BasicLevel
Returns the “default value” for a type. Read more
Source§impl PartialEq for BasicLevel
impl PartialEq for BasicLevel
impl StructuralPartialEq for BasicLevel
Auto Trait Implementations§
impl Freeze for BasicLevel
impl RefUnwindSafe for BasicLevel
impl Send for BasicLevel
impl Sync for BasicLevel
impl Unpin for BasicLevel
impl UnwindSafe for BasicLevel
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