Struct kanidmd_lib::schema::SchemaClass
source · [−]pub struct SchemaClass {
pub name: AttrString,
pub uuid: Uuid,
pub description: String,
pub systemmay: Vec<AttrString>,
pub may: Vec<AttrString>,
pub systemmust: Vec<AttrString>,
pub must: Vec<AttrString>,
pub systemsupplements: Vec<AttrString>,
pub supplements: Vec<AttrString>,
pub systemexcludes: Vec<AttrString>,
pub excludes: Vec<AttrString>,
}
Expand description
An item reperesenting a class and the rules for that class. These rules enforce that an
Entry
’s avas conform to a set of requirements, giving structure to an entry about
what avas must or may exist. The kanidm project provides attributes in systemmust
and
systemmay
, which can not be altered. An administrator may extend these in the must
and may
attributes.
Classes are additive, meaning that if there are two classes, the may
rules of both union,
and that if an attribute is must
on one class, and may
in another, the must
rule
takes precedence. It is not possible to combine classes in an incompatible way due to these
rules.
That in mind, and entry that has one of every possible class would probably be nonsensical,
but the addition rules make it easy to construct and understand with concepts like access
controls or accounts and posix extensions.
Fields
name: AttrString
uuid: Uuid
description: String
systemmay: Vec<AttrString>
This allows modification of system types to be extended in custom ways
may: Vec<AttrString>
systemmust: Vec<AttrString>
must: Vec<AttrString>
systemsupplements: Vec<AttrString>
A list of classes that this extends. These are an “or”, as at least one of the supplementing classes must also be present. Think of this as “inherits toward” or “provides”. This is just as “strict” as requires but operates in the opposite direction allowing a tree structure.
supplements: Vec<AttrString>
systemexcludes: Vec<AttrString>
A list of classes that can not co-exist with this item at the same time.
excludes: Vec<AttrString>
Implementations
sourceimpl SchemaClass
impl SchemaClass
pub fn try_from(
value: &Entry<EntrySealed, EntryCommitted>
) -> Result<Self, OperationError>
sourcepub fn may_iter(&self) -> impl Iterator<Item = &AttrString>
pub fn may_iter(&self) -> impl Iterator<Item = &AttrString>
An iterator over the full set of attrs that may or must exist on this class.
Trait Implementations
sourceimpl Clone for SchemaClass
impl Clone for SchemaClass
sourcefn clone(&self) -> SchemaClass
fn clone(&self) -> SchemaClass
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SchemaClass
impl Debug for SchemaClass
sourceimpl Default for SchemaClass
impl Default for SchemaClass
sourcefn default() -> SchemaClass
fn default() -> SchemaClass
Returns the “default value” for a type. Read more
sourceimpl From<&SchemaClass> for Entry<EntryInit, EntryNew>
impl From<&SchemaClass> for Entry<EntryInit, EntryNew>
sourcefn from(s: &SchemaClass) -> Self
fn from(s: &SchemaClass) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for SchemaClass
impl Send for SchemaClass
impl Sync for SchemaClass
impl Unpin for SchemaClass
impl UnwindSafe for SchemaClass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more