mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 21:17:01 +01:00
12 lines
22 KiB
HTML
12 lines
22 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `SchemaTransaction` trait in crate `kanidmd_lib`."><meta name="keywords" content="rust, rustlang, rust-lang, SchemaTransaction"><title>SchemaTransaction in kanidmd_lib::schema - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../kanidmd_lib/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../kanidmd_lib/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">SchemaTransaction</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.get_attributes">get_attributes</a></li><li><a href="#tymethod.get_attributes_unique">get_attributes_unique</a></li><li><a href="#tymethod.get_classes">get_classes</a></li><li><a href="#tymethod.get_reference_types">get_reference_types</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.is_multivalue">is_multivalue</a></li><li><a href="#method.normalise_attr_if_exists">normalise_attr_if_exists</a></li><li><a href="#method.normalise_attr_name">normalise_attr_name</a></li><li><a href="#method.query_attrs_difference">query_attrs_difference</a></li><li><a href="#method.validate">validate</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In kanidmd_lib::schema</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">kanidmd_lib</a>::<wbr><a href="index.html">schema</a>::<wbr><a class="trait" href="#">SchemaTransaction</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/kanidmd_lib/schema.rs.html#425-561">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait SchemaTransaction {
|
||
fn <a href="#tymethod.get_classes" class="fnname">get_classes</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaClass.html" title="struct kanidmd_lib::schema::SchemaClass">SchemaClass</a>>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.get_attributes" class="fnname">get_attributes</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaAttribute.html" title="struct kanidmd_lib::schema::SchemaAttribute">SchemaAttribute</a>>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.get_attributes_unique" class="fnname">get_attributes_unique</a>(&self) -> &<a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A></span><code class="content"><span class="where fmt-newline">impl<A> <a class="trait" href="https://doc.rust-lang.org/1.66.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A><span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,</span></span></code></span></span></span></span>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.get_reference_types" class="fnname">get_reference_types</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaAttribute.html" title="struct kanidmd_lib::schema::SchemaAttribute">SchemaAttribute</a>>;
|
||
|
||
fn <a href="#method.validate" class="fnname">validate</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>, <a class="enum" href="../prelude/enum.ConsistencyError.html" title="enum kanidmd_lib::prelude::ConsistencyError">ConsistencyError</a>>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A></span><code class="content"><span class="where fmt-newline">impl<A> <a class="trait" href="https://doc.rust-lang.org/1.66.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A><span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,</span></span></code></span></span></span></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.is_multivalue" class="fnname">is_multivalue</a>(&self, attr: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>, <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.normalise_attr_name" class="fnname">normalise_attr_name</a>(&self, an: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.normalise_attr_if_exists" class="fnname">normalise_attr_if_exists</a>(&self, an: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.query_attrs_difference" class="fnname">query_attrs_difference</a>(<br> &self,<br> prev_class: &<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>,<br> new_class: &<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>><br> ) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>, <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>), <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>> { ... }
|
||
}</code></pre></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><section id="tymethod.get_classes" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#426">source</a><h4 class="code-header">fn <a href="#tymethod.get_classes" class="fnname">get_classes</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaClass.html" title="struct kanidmd_lib::schema::SchemaClass">SchemaClass</a>></h4></section><section id="tymethod.get_attributes" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#427">source</a><h4 class="code-header">fn <a href="#tymethod.get_attributes" class="fnname">get_attributes</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaAttribute.html" title="struct kanidmd_lib::schema::SchemaAttribute">SchemaAttribute</a>></h4></section><section id="tymethod.get_attributes_unique" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#429">source</a><h4 class="code-header">fn <a href="#tymethod.get_attributes_unique" class="fnname">get_attributes_unique</a>(&self) -> &<a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A></span><code class="content"><span class="where fmt-newline">impl<A> <a class="trait" href="https://doc.rust-lang.org/1.66.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A><span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,</span></span></code></span></span></span></span></h4></section><section id="tymethod.get_reference_types" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#430">source</a><h4 class="code-header">fn <a href="#tymethod.get_reference_types" class="fnname">get_reference_types</a>(&self) -> &HashMap<<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>, <a class="struct" href="struct.SchemaAttribute.html" title="struct kanidmd_lib::schema::SchemaAttribute">SchemaAttribute</a>></h4></section></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><section id="method.validate" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#432-484">source</a><h4 class="code-header">fn <a href="#method.validate" class="fnname">validate</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>, <a class="enum" href="../prelude/enum.ConsistencyError.html" title="enum kanidmd_lib::prelude::ConsistencyError">ConsistencyError</a>>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A></span><code class="content"><span class="where fmt-newline">impl<A> <a class="trait" href="https://doc.rust-lang.org/1.66.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>, A><span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>,</span></span></code></span></span></span></span></h4></section><section id="method.is_multivalue" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#486-494">source</a><h4 class="code-header">fn <a href="#method.is_multivalue" class="fnname">is_multivalue</a>(&self, attr: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>, <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>></h4></section><section id="method.normalise_attr_name" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#496-499">source</a><h4 class="code-header">fn <a href="#method.normalise_attr_name" class="fnname">normalise_attr_name</a>(&self, an: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a></h4></section><section id="method.normalise_attr_if_exists" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#501-507">source</a><h4 class="code-header">fn <a href="#method.normalise_attr_if_exists" class="fnname">normalise_attr_if_exists</a>(&self, an: &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>></h4></section><section id="method.query_attrs_difference" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#509-560">source</a><h4 class="code-header">fn <a href="#method.query_attrs_difference" class="fnname">query_attrs_difference</a>(<br> &self,<br> prev_class: &<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>,<br> new_class: &<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>, <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a><&<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a>>), <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>></h4></section></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-SchemaTransaction-for-SchemaReadTransaction" class="impl has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#1742-1758">source</a><a href="#impl-SchemaTransaction-for-SchemaReadTransaction" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SchemaTransaction.html" title="trait kanidmd_lib::schema::SchemaTransaction">SchemaTransaction</a> for <a class="struct" href="struct.SchemaReadTransaction.html" title="struct kanidmd_lib::schema::SchemaReadTransaction">SchemaReadTransaction</a></h3></section><section id="impl-SchemaTransaction-for-SchemaWriteTransaction%3C%27a%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#1724-1740">source</a><a href="#impl-SchemaTransaction-for-SchemaWriteTransaction%3C%27a%3E" class="anchor"></a><h3 class="code-header">impl<'a> <a class="trait" href="trait.SchemaTransaction.html" title="trait kanidmd_lib::schema::SchemaTransaction">SchemaTransaction</a> for <a class="struct" href="struct.SchemaWriteTransaction.html" title="struct kanidmd_lib::schema::SchemaWriteTransaction">SchemaWriteTransaction</a><'a></h3></section></div><script src="../../implementors/kanidmd_lib/schema/trait.SchemaTransaction.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="kanidmd_lib" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12)" ></div></body></html> |