kanidm/docs/v1.0.0rc11/rustdoc/kanidmd_lib/prelude/struct.Duration.html

482 lines
206 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="A `Duration` type to represent a span of time, typically used for system timeouts."><meta name="keywords" content="rust, rustlang, rust-lang, Duration"><title>Duration in kanidmd_lib::prelude - 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 struct"><!--[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="#">Duration</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.MAX">MAX</a></li><li><a href="#associatedconstant.MICROSECOND">MICROSECOND</a></li><li><a href="#associatedconstant.MILLISECOND">MILLISECOND</a></li><li><a href="#associatedconstant.NANOSECOND">NANOSECOND</a></li><li><a href="#associatedconstant.SECOND">SECOND</a></li><li><a href="#associatedconstant.ZERO">ZERO</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.as_micros">as_micros</a></li><li><a href="#method.as_millis">as_millis</a></li><li><a href="#method.as_nanos">as_nanos</a></li><li><a href="#method.as_secs">as_secs</a></li><li><a href="#method.as_secs_f32">as_secs_f32</a></li><li><a href="#method.as_secs_f64">as_secs_f64</a></li><li><a href="#method.checked_add">checked_add</a></li><li><a href="#method.checked_div">checked_div</a></li><li><a href="#method.checked_mul">checked_mul</a></li><li><a href="#method.checked_sub">checked_sub</a></li><li><a href="#method.div_duration_f32">div_duration_f32</a></li><li><a href="#method.div_duration_f64">div_duration_f64</a></li><li><a href="#method.div_f32">div_f32</a></li><li><a href="#method.div_f64">div_f64</a></li><li><a href="#method.from_micros">from_micros</a></li><li><a href="#method.from_millis">from_millis</a></li><li><a href="#method.from_nanos">from_nanos</a></li><li><a href="#method.from_secs">from_secs</a></li><li><a href="#method.from_secs_f32">from_secs_f32</a></li><li><a href="#method.from_secs_f64">from_secs_f64</a></li><li><a href="#method.is_zero">is_zero</a></li><li><a href="#method.mul_f32">mul_f32</a><
timeouts.</p>
<p>Each <code>Duration</code> is composed of a whole number of seconds and a fractional part
represented in nanoseconds. If the underlying system does not support
nanosecond-level precision, APIs binding a system timeout will typically round up
the number of nanoseconds.</p>
<p><a href="struct.Duration.html" title="Duration"><code>Duration</code></a>s implement many common traits, including <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html" title="Add"><code>Add</code></a>, <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Sub.html" title="Sub"><code>Sub</code></a>, and other
<a href="https://doc.rust-lang.org/1.66.0/core/ops/index.html"><code>ops</code></a> traits. It implements <a href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="Default"><code>Default</code></a> by returning a zero-length <code>Duration</code>.</p>
<h2 id="examples"><a href="#examples">Examples</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>five_seconds = Duration::new(<span class="number">5</span>, <span class="number">0</span>);
<span class="kw">let </span>five_seconds_and_five_nanos = five_seconds + Duration::new(<span class="number">0</span>, <span class="number">5</span>);
<span class="macro">assert_eq!</span>(five_seconds_and_five_nanos.as_secs(), <span class="number">5</span>);
<span class="macro">assert_eq!</span>(five_seconds_and_five_nanos.subsec_nanos(), <span class="number">5</span>);
<span class="kw">let </span>ten_millis = Duration::from_millis(<span class="number">10</span>);</code></pre></div>
<h2 id="formatting-duration-values"><a href="#formatting-duration-values">Formatting <code>Duration</code> values</a></h2>
<p><code>Duration</code> intentionally does not have a <code>Display</code> impl, as there are a
variety of ways to format spans of time for human readability. <code>Duration</code>
provides a <code>Debug</code> impl that shows the full precision of the value.</p>
<p>The <code>Debug</code> output uses the non-ASCII “µs” suffix for microseconds. If your
program output may appear in contexts that cannot rely on full Unicode
compatibility, you may wish to format <code>Duration</code> objects yourself or use a
crate to do so.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#91">source</a><a href="#impl-Duration" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedconstant.SECOND" class="associatedconstant has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#103">source</a><h4 class="code-header">pub const <a href="#associatedconstant.SECOND" class="constant">SECOND</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::from_secs(1)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>duration_constants</code>)</span></div></span></summary><div class="docblock"><p>The duration of one second.</p>
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::SECOND, Duration::from_secs(<span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.MILLISECOND" class="associatedconstant has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#116">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MILLISECOND" class="constant">MILLISECOND</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::from_millis(1)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>duration_constants</code>)</span></div></span></summary><div class="docblock"><p>The duration of one millisecond.</p>
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::MILLISECOND, Duration::from_millis(<span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.MICROSECOND" class="associatedconstant has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#129">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MICROSECOND" class="constant">MICROSECOND</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::from_micros(1)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>duration_constants</code>)</span></div></span></summary><div class="docblock"><p>The duration of one microsecond.</p>
<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::MICROSECOND, Duration::from_micros(<span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.NANOSECOND" class="associatedconstant has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#142">source</a><h4 class="code-header">pub const <a href="#associatedconstant.NANOSECOND" class="constant">NANOSECOND</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::from_nanos(1)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>duration_constants</code>)</span></div></span></summary><div class="docblock"><p>The duration of one nanosecond.</p>
<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::NANOSECOND, Duration::from_nanos(<span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.ZERO" class="associatedconstant has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0">1.53.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#156">source</a></span><h4 class="code-header">pub const <a href="#associatedconstant.ZERO" class="constant">ZERO</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::from_nanos(0)</h4></section></summary><div class="docblock"><p>A duration of zero time.</p>
<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::ZERO;
<span class="macro">assert!</span>(duration.is_zero());
<span class="macro">assert_eq!</span>(duration.as_nanos(), <span class="number">0</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.MAX" class="associatedconstant has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0">1.53.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#175">source</a></span><h4 class="code-header">pub const <a href="#associatedconstant.MAX" class="constant">MAX</a>: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> = Duration::new(u64::MAX, NANOS_PER_SEC - 1)</h4></section></summary><div class="docblock"><p>The maximum duration.</p>
<p>May vary by platform as necessary. Must be able to contain the difference between
two instances of <a href="../../std/time/struct.Instant.html"><code>Instant</code></a> or two instances of <a href="../../std/time/struct.SystemTime.html"><code>SystemTime</code></a>.
This constraint gives it a value of about 584,942,417,355 years in practice,
which is currently used on all platforms.</p>
<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::MAX, Duration::new(u64::MAX, <span class="number">1_000_000_000 </span>- <span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.58.0">const: 1.58.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#199">source</a></span><h4 class="code-header">pub const fn <a href="#method.new" class="fnname">new</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>, nanos: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of whole seconds and
additional nanoseconds.</p>
<p>If the number of nanoseconds is greater than 1 billion (the number of
nanoseconds in a second), then it will carry over into the seconds provided.</p>
<h5 id="panics"><a href="#panics">Panics</a></h5>
<p>This constructor will panic if the carry from the nanoseconds overflows
the seconds counter.</p>
<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>five_seconds = Duration::new(<span class="number">5</span>, <span class="number">0</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_secs" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.32.0">const: 1.32.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#225">source</a></span><h4 class="code-header">pub const fn <a href="#method.from_secs" class="fnname">from_secs</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of whole seconds.</p>
<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_secs(<span class="number">5</span>);
<span class="macro">assert_eq!</span>(<span class="number">5</span>, duration.as_secs());
<span class="macro">assert_eq!</span>(<span class="number">0</span>, duration.subsec_nanos());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_millis" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.32.0">const: 1.32.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#245">source</a></span><h4 class="code-header">pub const fn <a href="#method.from_millis" class="fnname">from_millis</a>(millis: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of milliseconds.</p>
<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_millis(<span class="number">2569</span>);
<span class="macro">assert_eq!</span>(<span class="number">2</span>, duration.as_secs());
<span class="macro">assert_eq!</span>(<span class="number">569_000_000</span>, duration.subsec_nanos());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_micros" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0, const since 1.32.0">1.27.0 (const: 1.32.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#265">source</a></span><h4 class="code-header">pub const fn <a href="#method.from_micros" class="fnname">from_micros</a>(micros: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of microseconds.</p>
<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_micros(<span class="number">1_000_002</span>);
<span class="macro">assert_eq!</span>(<span class="number">1</span>, duration.as_secs());
<span class="macro">assert_eq!</span>(<span class="number">2000</span>, duration.subsec_nanos());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_nanos" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0, const since 1.32.0">1.27.0 (const: 1.32.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#285">source</a></span><h4 class="code-header">pub const fn <a href="#method.from_nanos" class="fnname">from_nanos</a>(nanos: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of nanoseconds.</p>
<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_nanos(<span class="number">1_000_000_123</span>);
<span class="macro">assert_eq!</span>(<span class="number">1</span>, duration.as_secs());
<span class="macro">assert_eq!</span>(<span class="number">123</span>, duration.subsec_nanos());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_zero" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0, const since 1.53.0">1.53.0 (const: 1.53.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#309">source</a></span><h4 class="code-header">pub const fn <a href="#method.is_zero" class="fnname">is_zero</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this <code>Duration</code> spans no time.</p>
<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert!</span>(Duration::ZERO.is_zero());
<span class="macro">assert!</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>).is_zero());
<span class="macro">assert!</span>(Duration::from_nanos(<span class="number">0</span>).is_zero());
<span class="macro">assert!</span>(Duration::from_secs(<span class="number">0</span>).is_zero());
<span class="macro">assert!</span>(!Duration::new(<span class="number">1</span>, <span class="number">1</span>).is_zero());
<span class="macro">assert!</span>(!Duration::from_nanos(<span class="number">1</span>).is_zero());
<span class="macro">assert!</span>(!Duration::from_secs(<span class="number">1</span>).is_zero());</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_secs" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.32.0">const: 1.32.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#337">source</a></span><h4 class="code-header">pub const fn <a href="#method.as_secs" class="fnname">as_secs</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Returns the number of <em>whole</em> seconds contained by this <code>Duration</code>.</p>
<p>The returned value does not include the fractional (nanosecond) part of the
duration, which can be obtained using <a href="struct.Duration.html#method.subsec_nanos"><code>subsec_nanos</code></a>.</p>
<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::new(<span class="number">5</span>, <span class="number">730023852</span>);
<span class="macro">assert_eq!</span>(duration.as_secs(), <span class="number">5</span>);</code></pre></div>
<p>To determine the total number of seconds represented by the <code>Duration</code>
including the fractional part, use <a href="struct.Duration.html#method.as_secs_f64"><code>as_secs_f64</code></a> or <a href="struct.Duration.html#method.as_secs_f32"><code>as_secs_f32</code></a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.subsec_millis" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0, const since 1.32.0">1.27.0 (const: 1.32.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#360">source</a></span><h4 class="code-header">pub const fn <a href="#method.subsec_millis" class="fnname">subsec_millis</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the fractional part of this <code>Duration</code>, in whole milliseconds.</p>
<p>This method does <strong>not</strong> return the length of the duration when
represented by milliseconds. The returned number always represents a
fractional portion of a second (i.e., it is less than one thousand).</p>
<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_millis(<span class="number">5432</span>);
<span class="macro">assert_eq!</span>(duration.as_secs(), <span class="number">5</span>);
<span class="macro">assert_eq!</span>(duration.subsec_millis(), <span class="number">432</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.subsec_micros" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0, const since 1.32.0">1.27.0 (const: 1.32.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#383">source</a></span><h4 class="code-header">pub const fn <a href="#method.subsec_micros" class="fnname">subsec_micros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the fractional part of this <code>Duration</code>, in whole microseconds.</p>
<p>This method does <strong>not</strong> return the length of the duration when
represented by microseconds. The returned number always represents a
fractional portion of a second (i.e., it is less than one million).</p>
<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_micros(<span class="number">1_234_567</span>);
<span class="macro">assert_eq!</span>(duration.as_secs(), <span class="number">1</span>);
<span class="macro">assert_eq!</span>(duration.subsec_micros(), <span class="number">234_567</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.subsec_nanos" class="method has-srclink"><span class="rightside"><span class="since" title="const since 1.32.0">const: 1.32.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#406">source</a></span><h4 class="code-header">pub const fn <a href="#method.subsec_nanos" class="fnname">subsec_nanos</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Returns the fractional part of this <code>Duration</code>, in nanoseconds.</p>
<p>This method does <strong>not</strong> return the length of the duration when
represented by nanoseconds. The returned number always represents a
fractional portion of a second (i.e., it is less than one billion).</p>
<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::from_millis(<span class="number">5010</span>);
<span class="macro">assert_eq!</span>(duration.as_secs(), <span class="number">5</span>);
<span class="macro">assert_eq!</span>(duration.subsec_nanos(), <span class="number">10_000_000</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_millis" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.33.0, const since 1.33.0">1.33.0 (const: 1.33.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#424">source</a></span><h4 class="code-header">pub const fn <a href="#method.as_millis" class="fnname">as_millis</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Returns the total number of whole milliseconds contained by this <code>Duration</code>.</p>
<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::new(<span class="number">5</span>, <span class="number">730023852</span>);
<span class="macro">assert_eq!</span>(duration.as_millis(), <span class="number">5730</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_micros" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.33.0, const since 1.33.0">1.33.0 (const: 1.33.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#442">source</a></span><h4 class="code-header">pub const fn <a href="#method.as_micros" class="fnname">as_micros</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Returns the total number of whole microseconds contained by this <code>Duration</code>.</p>
<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::new(<span class="number">5</span>, <span class="number">730023852</span>);
<span class="macro">assert_eq!</span>(duration.as_micros(), <span class="number">5730023</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_nanos" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.33.0, const since 1.33.0">1.33.0 (const: 1.33.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#460">source</a></span><h4 class="code-header">pub const fn <a href="#method.as_nanos" class="fnname">as_nanos</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></summary><div class="docblock"><p>Returns the total number of nanoseconds contained by this <code>Duration</code>.</p>
<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>duration = Duration::new(<span class="number">5</span>, <span class="number">730023852</span>);
<span class="macro">assert_eq!</span>(duration.as_nanos(), <span class="number">5730023852</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_add" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0, const since 1.58.0">1.16.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#482">source</a></span><h4 class="code-header">pub const fn <a href="#method.checked_add" class="fnname">checked_add</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Checked <code>Duration</code> addition. Computes <code>self + other</code>, returning <a href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>
if overflow occurred.</p>
<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>).checked_add(Duration::new(<span class="number">0</span>, <span class="number">1</span>)), <span class="prelude-val">Some</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>)));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">1</span>, <span class="number">0</span>).checked_add(Duration::new(u64::MAX, <span class="number">0</span>)), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.saturating_add" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0, const since 1.58.0">1.53.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#517">source</a></span><h4 class="code-header">pub const fn <a href="#method.saturating_add" class="fnname">saturating_add</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Saturating <code>Duration</code> addition. Computes <code>self + other</code>, returning <a href="struct.Duration.html#associatedconstant.MAX" title="Duration::MAX"><code>Duration::MAX</code></a>
if overflow occurred.</p>
<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>).saturating_add(Duration::new(<span class="number">0</span>, <span class="number">1</span>)), Duration::new(<span class="number">0</span>, <span class="number">1</span>));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">1</span>, <span class="number">0</span>).saturating_add(Duration::new(u64::MAX, <span class="number">0</span>)), Duration::MAX);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_sub" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0, const since 1.58.0">1.16.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#542">source</a></span><h4 class="code-header">pub const fn <a href="#method.checked_sub" class="fnname">checked_sub</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Checked <code>Duration</code> subtraction. Computes <code>self - other</code>, returning <a href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>
if the result would be negative or if overflow occurred.</p>
<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>).checked_sub(Duration::new(<span class="number">0</span>, <span class="number">0</span>)), <span class="prelude-val">Some</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>)));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>).checked_sub(Duration::new(<span class="number">0</span>, <span class="number">1</span>)), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.saturating_sub" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0, const since 1.58.0">1.53.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#575">source</a></span><h4 class="code-header">pub const fn <a href="#method.saturating_sub" class="fnname">saturating_sub</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Saturating <code>Duration</code> subtraction. Computes <code>self - other</code>, returning <a href="struct.Duration.html#associatedconstant.ZERO" title="Duration::ZERO"><code>Duration::ZERO</code></a>
if the result would be negative or if overflow occurred.</p>
<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>).saturating_sub(Duration::new(<span class="number">0</span>, <span class="number">0</span>)), Duration::new(<span class="number">0</span>, <span class="number">1</span>));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>).saturating_sub(Duration::new(<span class="number">0</span>, <span class="number">1</span>)), Duration::ZERO);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_mul" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0, const since 1.58.0">1.16.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#600">source</a></span><h4 class="code-header">pub const fn <a href="#method.checked_mul" class="fnname">checked_mul</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Checked <code>Duration</code> multiplication. Computes <code>self * other</code>, returning
<a href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a> if overflow occurred.</p>
<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">500_000_001</span>).checked_mul(<span class="number">2</span>), <span class="prelude-val">Some</span>(Duration::new(<span class="number">1</span>, <span class="number">2</span>)));
<span class="macro">assert_eq!</span>(Duration::new(u64::MAX - <span class="number">1</span>, <span class="number">0</span>).checked_mul(<span class="number">2</span>), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.saturating_mul" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0, const since 1.58.0">1.53.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#631">source</a></span><h4 class="code-header">pub const fn <a href="#method.saturating_mul" class="fnname">saturating_mul</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Saturating <code>Duration</code> multiplication. Computes <code>self * other</code>, returning
<a href="struct.Duration.html#associatedconstant.MAX" title="Duration::MAX"><code>Duration::MAX</code></a> if overflow occurred.</p>
<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(duration_constants)]
</span><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">0</span>, <span class="number">500_000_001</span>).saturating_mul(<span class="number">2</span>), Duration::new(<span class="number">1</span>, <span class="number">2</span>));
<span class="macro">assert_eq!</span>(Duration::new(u64::MAX - <span class="number">1</span>, <span class="number">0</span>).saturating_mul(<span class="number">2</span>), Duration::MAX);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_div" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0, const since 1.58.0">1.16.0 (const: 1.58.0)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#657">source</a></span><h4 class="code-header">pub const fn <a href="#method.checked_div" class="fnname">checked_div</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt;</h4></section></summary><div class="docblock"><p>Checked <code>Duration</code> division. Computes <code>self / other</code>, returning <a href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>
if <code>other == 0</code>.</p>
<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
<p>Basic usage:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">2</span>, <span class="number">0</span>).checked_div(<span class="number">2</span>), <span class="prelude-val">Some</span>(Duration::new(<span class="number">1</span>, <span class="number">0</span>)));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">1</span>, <span class="number">0</span>).checked_div(<span class="number">2</span>), <span class="prelude-val">Some</span>(Duration::new(<span class="number">0</span>, <span class="number">500_000_000</span>)));
<span class="macro">assert_eq!</span>(Duration::new(<span class="number">2</span>, <span class="number">0</span>).checked_div(<span class="number">0</span>), <span class="prelude-val">None</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_secs_f64" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#685">source</a></span><h4 class="code-header">pub fn <a href="#method.as_secs_f64" class="fnname">as_secs_f64</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></summary><div class="docblock"><p>Returns the number of seconds contained by this <code>Duration</code> as <code>f64</code>.</p>
<p>The returned value does include the fractional (nanosecond) part of the duration.</p>
<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="macro">assert_eq!</span>(dur.as_secs_f64(), <span class="number">2.7</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_secs_f32" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#704">source</a></span><h4 class="code-header">pub fn <a href="#method.as_secs_f32" class="fnname">as_secs_f32</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Returns the number of seconds contained by this <code>Duration</code> as <code>f32</code>.</p>
<p>The returned value does include the fractional (nanosecond) part of the duration.</p>
<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="macro">assert_eq!</span>(dur.as_secs_f32(), <span class="number">2.7</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_secs_f64" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#739">source</a></span><h4 class="code-header">pub fn <a href="#method.from_secs_f64" class="fnname">from_secs_f64</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of seconds represented
as <code>f64</code>.</p>
<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
<p>This constructor will panic if <code>secs</code> is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">0.0</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">1e-20</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">4.2e-7</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">420</span>));
<span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">2.7</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>));
<span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">3e10</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">30_000_000_000</span>, <span class="number">0</span>));
<span class="comment">// subnormal float
</span><span class="kw">let </span>res = Duration::from_secs_f64(f64::from_bits(<span class="number">1</span>));
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="comment">// conversion uses rounding
</span><span class="kw">let </span>res = Duration::from_secs_f64(<span class="number">0.999e-9</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_secs_f32" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#777">source</a></span><h4 class="code-header">pub fn <a href="#method.from_secs_f32" class="fnname">from_secs_f32</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Creates a new <code>Duration</code> from the specified number of seconds represented
as <code>f32</code>.</p>
<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
<p>This constructor will panic if <code>secs</code> is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">0.0</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">1e-20</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">4.2e-7</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">420</span>));
<span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">2.7</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">2</span>, <span class="number">700_000_048</span>));
<span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">3e10</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">30_000_001_024</span>, <span class="number">0</span>));
<span class="comment">// subnormal float
</span><span class="kw">let </span>res = Duration::from_secs_f32(f32::from_bits(<span class="number">1</span>));
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">0</span>));
<span class="comment">// conversion uses rounding
</span><span class="kw">let </span>res = Duration::from_secs_f32(<span class="number">0.999e-9</span>);
<span class="macro">assert_eq!</span>(res, Duration::new(<span class="number">0</span>, <span class="number">1</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul_f64" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#802">source</a></span><h4 class="code-header">pub fn <a href="#method.mul_f64" class="fnname">mul_f64</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Multiplies <code>Duration</code> by <code>f64</code>.</p>
<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
<p>This method will panic if result is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="macro">assert_eq!</span>(dur.mul_f64(<span class="number">3.14</span>), Duration::new(<span class="number">8</span>, <span class="number">478_000_000</span>));
<span class="macro">assert_eq!</span>(dur.mul_f64(<span class="number">3.14e5</span>), Duration::new(<span class="number">847_800</span>, <span class="number">0</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul_f32" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#824">source</a></span><h4 class="code-header">pub fn <a href="#method.mul_f32" class="fnname">mul_f32</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Multiplies <code>Duration</code> by <code>f32</code>.</p>
<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
<p>This method will panic if result is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="macro">assert_eq!</span>(dur.mul_f32(<span class="number">3.14</span>), Duration::new(<span class="number">8</span>, <span class="number">478_000_641</span>));
<span class="macro">assert_eq!</span>(dur.mul_f32(<span class="number">3.14e5</span>), Duration::new(<span class="number">847800</span>, <span class="number">0</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_f64" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#846">source</a></span><h4 class="code-header">pub fn <a href="#method.div_f64" class="fnname">div_f64</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Divide <code>Duration</code> by <code>f64</code>.</p>
<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
<p>This method will panic if result is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="macro">assert_eq!</span>(dur.div_f64(<span class="number">3.14</span>), Duration::new(<span class="number">0</span>, <span class="number">859_872_611</span>));
<span class="macro">assert_eq!</span>(dur.div_f64(<span class="number">3.14e5</span>), Duration::new(<span class="number">0</span>, <span class="number">8_599</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_f32" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.38.0, const unstable">1.38.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#870">source</a></span><h4 class="code-header">pub fn <a href="#method.div_f32" class="fnname">div_f32</a>(self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Divide <code>Duration</code> by <code>f32</code>.</p>
<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
<p>This method will panic if result is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="comment">// note that due to rounding errors result is slightly
// different from 0.859_872_611
</span><span class="macro">assert_eq!</span>(dur.div_f32(<span class="number">3.14</span>), Duration::new(<span class="number">0</span>, <span class="number">859_872_580</span>));
<span class="macro">assert_eq!</span>(dur.div_f32(<span class="number">3.14e5</span>), Duration::new(<span class="number">0</span>, <span class="number">8_599</span>));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_duration_f64" class="method has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#890">source</a></span><h4 class="code-header">pub fn <a href="#method.div_duration_f64" class="fnname">div_duration_f64</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>div_duration</code>)</span></div></span></summary><div class="docblock"><p>Divide <code>Duration</code> by <code>Duration</code> and return <code>f64</code>.</p>
<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(div_duration)]
</span><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur1 = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="kw">let </span>dur2 = Duration::new(<span class="number">5</span>, <span class="number">400_000_000</span>);
<span class="macro">assert_eq!</span>(dur1.div_duration_f64(dur2), <span class="number">0.5</span>);</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_duration_f32" class="method has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#910">source</a></span><h4 class="code-header">pub fn <a href="#method.div_duration_f32" class="fnname">div_duration_f32</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>div_duration</code>)</span></div></span></summary><div class="docblock"><p>Divide <code>Duration</code> by <code>Duration</code> and return <code>f32</code>.</p>
<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#![feature(div_duration)]
</span><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>dur1 = Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>);
<span class="kw">let </span>dur2 = Duration::new(<span class="number">5</span>, <span class="number">400_000_000</span>);
<span class="macro">assert_eq!</span>(dur1.div_duration_f32(dur2), <span class="number">0.5</span>);</code></pre></div>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Duration-1" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#1348">source</a><a href="#impl-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from_secs_f32" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0, const unstable">1.66.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#1407">source</a></span><h4 class="code-header">pub fn <a href="#method.try_from_secs_f32" class="fnname">try_from_secs_f32</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>, <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.TryFromFloatSecsError.html" title="struct core::time::TryFromFloatSecsError">TryFromFloatSecsError</a>&gt;</h4></section></summary><div class="docblock"><p>The checked version of <a href="struct.Duration.html#method.from_secs_f32"><code>from_secs_f32</code></a>.</p>
<p>This constructor will return an <code>Err</code> if <code>secs</code> is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">0.0</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">1e-20</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">4.2e-7</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">420</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">2.7</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">2</span>, <span class="number">700_000_048</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">3e10</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">30_000_001_024</span>, <span class="number">0</span>)));
<span class="comment">// subnormal float:
</span><span class="kw">let </span>res = Duration::try_from_secs_f32(f32::from_bits(<span class="number">1</span>));
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f32(-<span class="number">5.0</span>);
<span class="macro">assert!</span>(res.is_err());
<span class="kw">let </span>res = Duration::try_from_secs_f32(f32::NAN);
<span class="macro">assert!</span>(res.is_err());
<span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">2e19</span>);
<span class="macro">assert!</span>(res.is_err());
<span class="comment">// the conversion uses rounding with tie resolution to even
</span><span class="kw">let </span>res = Duration::try_from_secs_f32(<span class="number">0.999e-9</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>)));
<span class="comment">// this float represents exactly 976562.5e-9
</span><span class="kw">let </span>val = f32::from_bits(<span class="number">0x3A80_0000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f32(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">976_562</span>)));
<span class="comment">// this float represents exactly 2929687.5e-9
</span><span class="kw">let </span>val = f32::from_bits(<span class="number">0x3B40_0000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f32(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">2_929_688</span>)));
<span class="comment">// this float represents exactly 1.000_976_562_5
</span><span class="kw">let </span>val = f32::from_bits(<span class="number">0x3F802000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f32(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">1</span>, <span class="number">976_562</span>)));
<span class="comment">// this float represents exactly 1.002_929_687_5
</span><span class="kw">let </span>val = f32::from_bits(<span class="number">0x3F806000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f32(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">1</span>, <span class="number">2_929_688</span>)));</code></pre></div>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from_secs_f64" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.66.0, const unstable">1.66.0 (const: <a href="https://github.com/rust-lang/rust/issues/72440" title="Tracking issue for duration_consts_float">unstable</a>)</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#1484">source</a></span><h4 class="code-header">pub fn <a href="#method.try_from_secs_f64" class="fnname">try_from_secs_f64</a>(secs: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>, <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.TryFromFloatSecsError.html" title="struct core::time::TryFromFloatSecsError">TryFromFloatSecsError</a>&gt;</h4></section></summary><div class="docblock"><p>The checked version of <a href="struct.Duration.html#method.from_secs_f64"><code>from_secs_f64</code></a>.</p>
<p>This constructor will return an <code>Err</code> if <code>secs</code> is negative, overflows <code>Duration</code> or not finite.</p>
<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::time::Duration;
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">0.0</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">1e-20</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">4.2e-7</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">420</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">2.7</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">2</span>, <span class="number">700_000_000</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">3e10</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">30_000_000_000</span>, <span class="number">0</span>)));
<span class="comment">// subnormal float
</span><span class="kw">let </span>res = Duration::try_from_secs_f64(f64::from_bits(<span class="number">1</span>));
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(-<span class="number">5.0</span>);
<span class="macro">assert!</span>(res.is_err());
<span class="kw">let </span>res = Duration::try_from_secs_f64(f64::NAN);
<span class="macro">assert!</span>(res.is_err());
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">2e19</span>);
<span class="macro">assert!</span>(res.is_err());
<span class="comment">// the conversion uses rounding with tie resolution to even
</span><span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">0.999e-9</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">1</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">0.999_999_999_499</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">999_999_999</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">0.999_999_999_501</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">1</span>, <span class="number">0</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">42.999_999_999_499</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">42</span>, <span class="number">999_999_999</span>)));
<span class="kw">let </span>res = Duration::try_from_secs_f64(<span class="number">42.999_999_999_501</span>);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">43</span>, <span class="number">0</span>)));
<span class="comment">// this float represents exactly 976562.5e-9
</span><span class="kw">let </span>val = f64::from_bits(<span class="number">0x3F50_0000_0000_0000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f64(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">976_562</span>)));
<span class="comment">// this float represents exactly 2929687.5e-9
</span><span class="kw">let </span>val = f64::from_bits(<span class="number">0x3F68_0000_0000_0000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f64(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">0</span>, <span class="number">2_929_688</span>)));
<span class="comment">// this float represents exactly 1.000_976_562_5
</span><span class="kw">let </span>val = f64::from_bits(<span class="number">0x3FF0_0400_0000_0000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f64(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">1</span>, <span class="number">976_562</span>)));
<span class="comment">// this float represents exactly 1.002_929_687_5
</span><span class="kw">let </span>val = f64::from_bits(<span class="number">0x3_FF00_C000_0000_000</span>);
<span class="kw">let </span>res = Duration::try_from_secs_f64(val);
<span class="macro">assert_eq!</span>(res, <span class="prelude-val">Ok</span>(Duration::new(<span class="number">1</span>, <span class="number">2_929_688</span>)));</code></pre></div>
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3CDuration%3E-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#916">source</a><a href="#impl-Add%3CDuration%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-3" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#919">source</a><a href="#method.add" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, rhs: <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3CDuration%3E-for-Duration-1" class="impl has-srclink"><a href="#impl-Add%3CDuration%3E-for-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-4" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = Duration</h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add-1" class="method trait-impl has-srclink"><a href="#method.add-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, rhs: Duration) -&gt; &lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a> as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;Duration&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.Add.html#associat
by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDuration%3E-for-Duration-1" class="impl has-srclink"><a href="#impl-PartialEq%3CDuration%3E-for-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl has-srclink"><a href="#method.eq-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, rhs: &amp;Duration) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDuration%3E-for-Duration-2" class="impl has-srclink"><a href="#impl-PartialEq%3CDuration%3E-for-Duration-2" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl has-srclink"><a href="#method.eq-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, rhs: &amp;Duration) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDuration%3E-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#84">source</a><a href="#impl-PartialOrd%3CDuration%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#84">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, other: &amp;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDuration%3E-for-Duration-1" class="impl has-srclink"><a href="#impl-PartialOrd%3CDuration%3E-for-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl has-srclink"><a href="#method.partial_cmp-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, rhs: &amp;Duration) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDuration%3E-for-Duration-2" class="impl has-srclink"><a href="#impl-PartialOrd%3CDuration%3E-for-Duration-2" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl has-srclink"><a href="#method.partial_cmp-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, rhs: &amp;Duration) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-SampleUniform-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#1046">source</a><a href="#impl-SampleUniform-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://rust-random.github.io/rand/rand/distributions/uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Sampler" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler" class="anchor"></a><h4 class="code-header">type <a href="https://rust-random.github.io/rand/rand/distributions/uniform/trait.SampleUniform.html#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="https://rust-random.github.io/rand/rand/distributions/uniform/struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h4></section></summary><div class='docblock'>The <code>UniformSampler</code> implementation supporting type <code>X</code>.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-SampleUniform-for-Duration-1" class="impl has-srclink"><a class="srclink rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#861">source</a><a href="#impl-SampleUniform-for-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://rust-random.github.io/rand/rand/distributions/uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Sampler-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-1" class="anchor"></a><h4 class="code-header">type <a href="https://rust-random.github.io/rand/rand/distributions/uniform/trait.SampleUniform.html#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="https://rust-random.github.io/rand/rand/distributions/uniform/struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h4></section></summary><div class='docblock'>The <code>UniformSampler</code> implementation supporting type <code>X</code>.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Serialize-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.152/src/serde/ser/impls.rs.html#632">source</a><a href="#impl-Serialize-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://docs.rs/serde/1.0.152/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.serialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.152/src/serde/ser/impls.rs.html#633-635">source</a><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.152/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;S&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbs
“summing up” the items. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Sum.html#tymethod.sum">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sum%3CDuration%3E-for-Duration" class="impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0">1.16.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#1015">source</a></span><a href="#impl-Sum%3CDuration%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Sum.html" title="trait core::iter::traits::accum::Sum">Sum</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sum" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#1016">source</a><a href="#method.sum" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Sum.html#tymethod.sum" class="fnname">sum</a>&lt;I&gt;(iter: I) -&gt; <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a><span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>&gt;,</span></h4></section></summary><div class='docblock'>Method which takes an iterator and generates <code>Self</code> from the elements by
“summing up” the items. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Sum.html#tymethod.sum">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CDuration%3E-for-Duration" class="impl has-srclink"><a href="#impl-TryFrom%3CDuration%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = ConversionRange</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(duration: Duration) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>, ConversionRange&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-TryFrom%3CDuration%3E-for-Duration-1" class="impl has-srclink"><a href="#impl-TryFrom%3CDuration%3E-for-Duration-1" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;Duration&gt; for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = ConversionRange</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from-1" class="method trait-impl has-srclink"><a href="#method.try_from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(duration: Duration) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Duration.html" title="struct kanidmd_lib::prelude::Duration">Duration</a>, ConversionRange&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Copy-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/time.rs.html#84">source</a><a href="#impl-Copy-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Duration.html" title="struct kanidmd_lib
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Instrument-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><a href="#impl-Instrument-for-Duration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html" title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><a href="#method.in_current_span" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a> <a href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Pointable-for-Duration" class="impl has-srclink"><a href="#impl-Pointable-for-Duration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; Pointable for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedconstant.ALIGN" class="associatedconstant trait-impl has-srclink"><a href="#associatedconstant.ALIGN" class="anchor"></a><h4 class="code-header">const <a class="constant">ALIGN</a>: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a> = mem::align_of::&lt;T&gt;()</h4></section></summary><div class='docblock'>The alignment of pointer.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Init" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Init" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Init</a> = T</h4></section></summary><div class='docblock'>The type for initializers.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.init" class="method trait-impl has-srclink"><a href="#method.init" class="anchor"></a><h4 class="code-header">unsafe fn <a class="fnname">init</a>(init: &lt;T as Pointable&gt;::Init) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Initializes a with the given initializer. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a href="#method.deref" class="anchor"></a><h4 class="code-header">unsafe fn <a class="fnname">deref</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;'a </a>T</h4></section></summary><div class='docblock'>Dereferences the given pointer. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl has-srclink"><a href="#method.deref_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a class="fnname">deref_mut</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&amp;'a mut </a>T</h4></section></summary><div class='docblock'>Mutably dereferences the given pointer. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl has-srclink"><a href="#method.drop" class="anchor"></a><h4 class="code-header">unsafe fn <a class="fnname">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Drops the object pointed to by the given pointer. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Same%3CT%3E-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/typenum/1.15.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same%3CT%3E-for-Duration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-10" class="anchor"></a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.15.0/typenum/type_operators/trait.Same.html#associatedtype.Output" clas
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><a href="#method.with_current_subscriber" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber" class="fnname">with_current_subscriber</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="struct tracing::instrument::WithDispatch">WithDispatch</a>&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a> <a href="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
<a href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html" title="WithDispatch"><code>WithDispatch</code></a> wrapper. <a href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details><section id="impl-DeserializeOwned-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="https://docs.rs/serde/1.0.152/src/serde/de/mod.rs.html#604">source</a><a href="#impl-DeserializeOwned-for-Duration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.152/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.152/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,</span></h3></section></div></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>