Struct kanidmd_lib::schema::SchemaClass
source · pub struct SchemaClass {
pub name: AttrString,
pub uuid: Uuid,
pub description: String,
pub sync_allowed: bool,
pub systemmay: Vec<Attribute>,
pub may: Vec<Attribute>,
pub systemmust: Vec<Attribute>,
pub must: Vec<Attribute>,
pub systemsupplements: Vec<AttrString>,
pub supplements: Vec<AttrString>,
pub systemexcludes: Vec<AttrString>,
pub excludes: Vec<AttrString>,
}
Expand description
An item representing 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, an 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
§sync_allowed: bool
§systemmay: Vec<Attribute>
This allows modification of system types to be extended in custom ways
may: Vec<Attribute>
§systemmust: Vec<Attribute>
§must: Vec<Attribute>
§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§
source§impl SchemaClass
impl SchemaClass
pub fn try_from( value: &Entry<EntrySealed, EntryCommitted>, ) -> Result<Self, OperationError>
Trait Implementations§
source§impl Clone for SchemaClass
impl Clone for SchemaClass
source§fn clone(&self) -> SchemaClass
fn clone(&self) -> SchemaClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SchemaClass
impl Debug for SchemaClass
source§impl Default for SchemaClass
impl Default for SchemaClass
source§fn default() -> SchemaClass
fn default() -> SchemaClass
source§impl From<&SchemaClass> for Entry<EntryInit, EntryNew>
impl From<&SchemaClass> for Entry<EntryInit, EntryNew>
source§fn from(s: &SchemaClass) -> Self
fn from(s: &SchemaClass) -> Self
source§impl From<SchemaClass> for EntryInitNew
impl From<SchemaClass> for EntryInitNew
source§fn from(value: SchemaClass) -> Self
fn from(value: SchemaClass) -> Self
Auto Trait Implementations§
impl Freeze for SchemaClass
impl RefUnwindSafe for SchemaClass
impl Send for SchemaClass
impl Sync for SchemaClass
impl Unpin for SchemaClass
impl UnwindSafe for SchemaClass
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request