kanidm/docs/v1.1.0-alpha/rustdoc/kanidmd_lib/schema/trait.SchemaTransaction.html

12 lines
22 KiB
HTML
Raw Normal View History

<!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">&#9776;</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
fn <a href="#tymethod.get_classes" class="fnname">get_classes</a>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.get_attributes" class="fnname">get_attributes</a>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.get_attributes_unique" class="fnname">get_attributes_unique</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>&gt;<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.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;</span><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.66.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.66.1/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>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;;
fn <a href="#method.validate" class="fnname">validate</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.66.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.unit.html">()</a>, <a class="enum" href="../prelude/enum.ConsistencyError.html" title="enum kanidmd_lib::prelude::ConsistencyError">ConsistencyError</a>&gt;&gt;<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.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;</span><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.66.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.66.1/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>(&amp;self, attr: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.bool.html">bool</a>, <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.normalise_attr_name" class="fnname">normalise_attr_name</a>(&amp;self, an: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>) -&gt; <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>(&amp;self, an: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.query_attrs_difference" class="fnname">query_attrs_difference</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prev_class: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new_class: &amp;<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>&gt;, <a class="struct" href="../idm/authsession/struct.Set.html" title="struct kanidmd_lib::idm::authsession::Set">BTreeSet</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.str.html">str</a>&gt;), <a class="enum" href="../prelude/enum.SchemaError.html" title="enum kanidmd_lib::prelude::SchemaError">SchemaError</a>&gt; { ... }
}</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#429">source</a><h4 class="code-header">fn <a href="#tymethod.get_classes" class="fnname">get_classes</a>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;</h4></section><section id="tymethod.get_attributes" 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_attributes" class="fnname">get_attributes</a>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;</h4></section><section id="tymethod.get_attributes_unique" class="method has-srclink"><a class="srclink rightside" href="../../src/kanidmd_lib/schema.rs.html#432">source</a><h4 class="code-header">fn <a href="#tymethod.get_attributes_unique" class="fnname">get_attributes_unique</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="type" href="../prelude/type.AttrString.html" title="type kanidmd_lib::prelude::AttrString">AttrString</a>&gt;<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.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;</span><code class="content"><span class="where fmt-newline">impl&lt;A&gt; <a class="trait" href="https://doc.rust-lang.org/1.66.1/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.66.1/std/primitive.u8.html">u8</a>, A&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="https://doc.rust-lang.org/1.66.1/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#433">source</a><h4 class="code-header">fn <a href="#tymethod.get_reference_types" class="fnname">get_reference_types</a>(&amp;self) -&gt; &amp;HashMap&lt;<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>&gt;</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#435-487">source</a><h4 class="code-header">fn <a href="#method.validate" class="fnname">validate</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.66.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.66.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https: