deploy: de38ae62916547ad097c066f94a32e9ba7790eeb

This commit is contained in:
NotAShelf 2025-02-05 00:10:33 +00:00
commit 9a86359447
28502 changed files with 1261284 additions and 0 deletions

1
uuid/all.html Normal file
View file

@ -0,0 +1 @@
<!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="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod sys"><!--[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" title="show sidebar"></button><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#macros">Crate Items</a></h3><ul class="block"><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.Builder.html">Builder</a></li><li><a href="struct.Error.html">Error</a></li><li><a href="struct.Uuid.html">Uuid</a></li><li><a href="fmt/struct.Braced.html">fmt::Braced</a></li><li><a href="fmt/struct.Hyphenated.html">fmt::Hyphenated</a></li><li><a href="fmt/struct.Simple.html">fmt::Simple</a></li><li><a href="fmt/struct.Urn.html">fmt::Urn</a></li><li><a href="timestamp/struct.Timestamp.html">timestamp::Timestamp</a></li><li><a href="timestamp/context/struct.NoContext.html">timestamp::context::NoContext</a></li><li><a href="timestamp/context/struct.ThreadLocalContext.html">timestamp::context::ThreadLocalContext</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.Variant.html">Variant</a></li><li><a href="enum.Version.html">Version</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="timestamp/trait.ClockSequence.html">timestamp::ClockSequence</a></li></ul><h3 id="macros">Macros</h3><ul class="all-items"><li><a href="macro.uuid.html">uuid</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="type.Bytes.html">Bytes</a></li></ul><h3 id="constants">Constants</h3><ul class="all-items"><li><a href="timestamp/constant.UUID_TICKS_BETWEEN_EPOCHS.html">timestamp::UUID_TICKS_BETWEEN_EPOCHS</a></li></ul></section></div></main></body></html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../uuid/struct.Builder.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../uuid/struct.Builder.html">../../uuid/struct.Builder.html</a>...</p>
<script>location.replace("../../uuid/struct.Builder.html" + location.search + location.hash);</script>
</body>
</html>

30
uuid/enum.Variant.html Normal file

File diff suppressed because one or more lines are too long

40
uuid/enum.Version.html Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../uuid/struct.Error.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../uuid/struct.Error.html">../../uuid/struct.Error.html</a>...</p>
<script>location.replace("../../uuid/struct.Error.html" + location.search + location.hash);</script>
</body>
</html>

6
uuid/fmt/index.html Normal file
View file

@ -0,0 +1,6 @@
<!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="Adapters for alternative string formats."><title>uuid::fmt - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module fmt</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate uuid</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">uuid</a></span><h1>Module <span>fmt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/uuid/fmt.rs.html#12-1040">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Adapters for alternative string formats.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Braced.html" title="struct uuid::fmt::Braced">Braced</a></div><div class="desc docblock-short">Format a <a href="../struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a> as a braced hyphenated string, like
<code>{67e55044-10b1-426f-9247-bb680e5fe0c8}</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Hyphenated.html" title="struct uuid::fmt::Hyphenated">Hyphenated</a></div><div class="desc docblock-short">Format a <a href="../struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a> as a hyphenated string, like
<code>67e55044-10b1-426f-9247-bb680e5fe0c8</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Simple.html" title="struct uuid::fmt::Simple">Simple</a></div><div class="desc docblock-short">Format a <a href="../struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a> as a simple string, like
<code>67e5504410b1426f9247bb680e5fe0c8</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Urn.html" title="struct uuid::fmt::Urn">Urn</a></div><div class="desc docblock-short">Format a <a href="../struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a> as a URN string, like
<code>urn:uuid:67e55044-10b1-426f-9247-bb680e5fe0c8</code>.</div></li></ul></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["Braced","Hyphenated","Simple","Urn"]};

107
uuid/fmt/struct.Braced.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

106
uuid/fmt/struct.Simple.html Normal file

File diff suppressed because one or more lines are too long

112
uuid/fmt/struct.Urn.html Normal file

File diff suppressed because one or more lines are too long

124
uuid/index.html Normal file
View file

@ -0,0 +1,124 @@
<!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="Generate and parse universally unique identifiers (UUIDs)."><title>uuid - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod crate"><!--[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" title="show sidebar"></button><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#getting-started" title="Getting started">Getting started</a></li><li><a href="#working-with-different-uuid-versions" title="Working with different UUID versions">Working with different UUID versions</a><ul><li><a href="#which-uuid-version-should-i-use" title="Which UUID version should I use?">Which UUID version should I use?</a></li></ul></li><li><a href="#other-features" title="Other features">Other features</a></li><li><a href="#unstable-features" title="Unstable features">Unstable features</a></li><li><a href="#building-for-other-targets" title="Building for other targets">Building for other targets</a><ul><li><a href="#webassembly" title="WebAssembly">WebAssembly</a></li><li><a href="#embedded" title="Embedded">Embedded</a></li></ul></li><li><a href="#examples" title="Examples">Examples</a></li><li><a href="#references" title="References">References</a></li></ul><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>uuid</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/uuid/lib.rs.html#12-1895">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate and parse universally unique identifiers (UUIDs).</p>
<p>Heres an example of a UUID:</p>
<div class="example-wrap"><pre class="language-text"><code>67e55044-10b1-426f-9247-bb680e5fe0c8</code></pre></div>
<p>A UUID is a unique 128-bit value, stored as 16 octets, and regularly
formatted as a hex string in five groups. UUIDs are used to assign unique
identifiers to entities without requiring a central allocating authority.</p>
<p>They are particularly useful in distributed systems, though can be used in
disparate areas, such as databases and network protocols. Typically a UUID
is displayed in a readable string form as a sequence of hexadecimal digits,
separated into groups by hyphens.</p>
<p>The uniqueness property is not strictly guaranteed, however for all
practical purposes, it can be assumed that an unintentional collision would
be extremely unlikely.</p>
<p>UUIDs have a number of standardized encodings that are specified in <a href="https://www.ietf.org/rfc/rfc9562.html">RFC 9562</a>.</p>
<h2 id="getting-started"><a class="doc-anchor" href="#getting-started">§</a>Getting started</h2>
<p>Add the following to your <code>Cargo.toml</code>:</p>
<div class="example-wrap"><pre class="language-toml"><code>[dependencies.uuid]
version = &quot;1.11.0&quot;
features = [
&quot;v4&quot;, # Lets you generate random UUIDs
&quot;fast-rng&quot;, # Use a faster (but still sufficiently random) RNG
&quot;macro-diagnostics&quot;, # Enable better diagnostics for compile-time UUIDs
]</code></pre></div>
<p>When you want a UUID, you can generate one:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid;
<span class="kw">let </span>id = Uuid::new_v4();</code></pre></div>
<p>If you have a UUID value, you can use its string literal form inline:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::{uuid, Uuid};
<span class="kw">const </span>ID: Uuid = <span class="macro">uuid!</span>(<span class="string">"67e55044-10b1-426f-9247-bb680e5fe0c8"</span>);</code></pre></div>
<h2 id="working-with-different-uuid-versions"><a class="doc-anchor" href="#working-with-different-uuid-versions">§</a>Working with different UUID versions</h2>
<p>This library supports all standardized methods for generating UUIDs through individual Cargo features.</p>
<p>By default, this crate depends on nothing but the Rust standard library and can parse and format
UUIDs, but cannot generate them. Depending on the kind of UUID youd like to work with, there
are Cargo features that enable generating them:</p>
<ul>
<li><code>v1</code> - Version 1 UUIDs using a timestamp and monotonic counter.</li>
<li><code>v3</code> - Version 3 UUIDs based on the MD5 hash of some data.</li>
<li><code>v4</code> - Version 4 UUIDs with random data.</li>
<li><code>v5</code> - Version 5 UUIDs based on the SHA1 hash of some data.</li>
<li><code>v6</code> - Version 6 UUIDs using a timestamp and monotonic counter.</li>
<li><code>v7</code> - Version 7 UUIDs using a Unix timestamp.</li>
<li><code>v8</code> - Version 8 UUIDs using user-defined data.</li>
</ul>
<p>This library also includes a <a href="struct.Builder.html" title="struct uuid::Builder"><code>Builder</code></a> type that can be used to help construct UUIDs of any
version without any additional dependencies or features. Its a lower-level API than <a href="struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a>
that can be used when you need control over implicit requirements on things like a source
of randomness.</p>
<h3 id="which-uuid-version-should-i-use"><a class="doc-anchor" href="#which-uuid-version-should-i-use">§</a>Which UUID version should I use?</h3>
<p>If you just want to generate unique identifiers then consider version 4 (<code>v4</code>) UUIDs. If you want
to use UUIDs as database keys or need to sort them then consider version 7 (<code>v7</code>) UUIDs.
Other versions should generally be avoided unless theres an existing need for them.</p>
<p>Some UUID versions supersede others. Prefer version 6 over version 1 and version 5 over version 3.</p>
<h2 id="other-features"><a class="doc-anchor" href="#other-features">§</a>Other features</h2>
<p>Other crate features can also be useful beyond the version support:</p>
<ul>
<li><code>macro-diagnostics</code> - enhances the diagnostics of <code>uuid!</code> macro.</li>
<li><code>serde</code> - adds the ability to serialize and deserialize a UUID using
<code>serde</code>.</li>
<li><code>borsh</code> - adds the ability to serialize and deserialize a UUID using
<code>borsh</code>.</li>
<li><code>arbitrary</code> - adds an <code>Arbitrary</code> trait implementation to <code>Uuid</code> for
fuzzing.</li>
<li><code>fast-rng</code> - uses a faster algorithm for generating random UUIDs.
This feature requires more dependencies to compile, but is just as suitable for
UUIDs as the default algorithm.</li>
<li><code>bytemuck</code> - adds a <code>Pod</code> trait implementation to <code>Uuid</code> for byte manipulation</li>
</ul>
<h2 id="unstable-features"><a class="doc-anchor" href="#unstable-features">§</a>Unstable features</h2>
<p>Some features are unstable. They may be incomplete or depend on other
unstable libraries. These include:</p>
<ul>
<li><code>zerocopy</code> - adds support for zero-copy deserialization using the
<code>zerocopy</code> library.</li>
</ul>
<p>Unstable features may break between minor releases.</p>
<p>To allow unstable features, youll need to enable the Cargo feature as
normal, but also pass an additional flag through your environment to opt-in
to unstable <code>uuid</code> features:</p>
<div class="example-wrap"><pre class="language-text"><code>RUSTFLAGS=&quot;--cfg uuid_unstable&quot;</code></pre></div><h2 id="building-for-other-targets"><a class="doc-anchor" href="#building-for-other-targets">§</a>Building for other targets</h2><h3 id="webassembly"><a class="doc-anchor" href="#webassembly">§</a>WebAssembly</h3>
<p>For WebAssembly, enable the <code>js</code> feature:</p>
<div class="example-wrap"><pre class="language-toml"><code>[dependencies.uuid]
version = &quot;1.11.0&quot;
features = [
&quot;v4&quot;,
&quot;v7&quot;,
&quot;js&quot;,
]</code></pre></div><h3 id="embedded"><a class="doc-anchor" href="#embedded">§</a>Embedded</h3>
<p>For embedded targets without the standard library, youll need to
disable default features when building <code>uuid</code>:</p>
<div class="example-wrap"><pre class="language-toml"><code>[dependencies.uuid]
version = &quot;1.11.0&quot;
default-features = false</code></pre></div>
<p>Some additional features are supported in no-std environments:</p>
<ul>
<li><code>v1</code>, <code>v3</code>, <code>v5</code>, <code>v6</code>, and <code>v8</code>.</li>
<li><code>serde</code>.</li>
</ul>
<p>If you need to use <code>v4</code> or <code>v7</code> in a no-std environment, youll need to
follow <a href="https://docs.rs/getrandom"><code>getrandom</code>s docs</a> on configuring a source of randomness
on currently unsupported targets. Alternatively, you can produce
random bytes yourself and then pass them to <a href="struct.Builder.html#method.from_random_bytes" title="associated function uuid::Builder::from_random_bytes"><code>Builder::from_random_bytes</code></a>
without enabling the <code>v4</code> or <code>v7</code> features.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<p>Parse a UUID given in the simple format and print it as a URN:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>my_uuid = Uuid::parse_str(<span class="string">"a1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8"</span>)<span class="question-mark">?</span>;
<span class="macro">println!</span>(<span class="string">"{}"</span>, my_uuid.urn());</code></pre></div>
<p>Generate a random UUID and print it out in hexadecimal form:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Note that this requires the `v4` feature to be enabled.
</span><span class="kw">let </span>my_uuid = Uuid::new_v4();
<span class="macro">println!</span>(<span class="string">"{}"</span>, my_uuid);</code></pre></div>
<h2 id="references"><a class="doc-anchor" href="#references">§</a>References</h2>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">Wikipedia: Universally Unique Identifier</a></li>
<li><a href="https://www.ietf.org/rfc/rfc9562.html">RFC 9562: Universally Unique IDentifiers (UUID)</a>.</li>
</ul>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.NoContext"><code>pub use timestamp::context::<a class="struct" href="timestamp/context/struct.NoContext.html" title="struct uuid::timestamp::context::NoContext">NoContext</a>;</code></div></li><li><div class="item-name" id="reexport.ClockSequence"><code>pub use timestamp::<a class="trait" href="timestamp/trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>;</code></div></li><li><div class="item-name" id="reexport.Timestamp"><code>pub use timestamp::<a class="struct" href="timestamp/struct.Timestamp.html" title="struct uuid::timestamp::Timestamp">Timestamp</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="fmt/index.html" title="mod uuid::fmt">fmt</a></div><div class="desc docblock-short">Adapters for alternative string formats.</div></li><li><div class="item-name"><a class="mod" href="timestamp/index.html" title="mod uuid::timestamp">timestamp</a></div><div class="desc docblock-short">Generating UUIDs from timestamps.</div></li></ul><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="macro" href="macro.uuid.html" title="macro uuid::uuid">uuid</a></div><div class="desc docblock-short">Parse <a href="https://docs.rs/uuid/*/uuid/struct.Uuid.html"><code>Uuid</code></a>s from string literals at compile time.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Builder.html" title="struct uuid::Builder">Builder</a></div><div class="desc docblock-short">A builder for creating a UUID.</div></li><li><div class="item-name"><a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a></div><div class="desc docblock-short">A general error that can occur when working with UUIDs.</div></li><li><div class="item-name"><a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></div><div class="desc docblock-short">A Universally Unique Identifier (UUID).</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Variant.html" title="enum uuid::Variant">Variant</a></div><div class="desc docblock-short">The reserved variants of UUIDs.</div></li><li><div class="item-name"><a class="enum" href="enum.Version.html" title="enum uuid::Version">Version</a></div><div class="desc docblock-short">The version of the UUID, denoting the generating algorithm.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Bytes.html" title="type uuid::Bytes">Bytes</a></div><div class="desc docblock-short">A 128-bit (16 byte) buffer containing the UUID.</div></li></ul></section></div></main></body></html>

11
uuid/macro.uuid!.html Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=macro.uuid.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.uuid.html">macro.uuid.html</a>...</p>
<script>location.replace("macro.uuid.html" + location.search + location.hash);</script>
</body>
</html>

30
uuid/macro.uuid.html Normal file
View file

@ -0,0 +1,30 @@
<!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="Parse `Uuid`s from string literals at compile time."><title>uuid in uuid - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc macro"><!--[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" title="show sidebar"></button><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">uuid</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#usage" title="Usage">Usage</a></li><li><a href="#examples" title="Examples">Examples</a></li><li><a href="#compilation-failures" title="Compilation Failures">Compilation Failures</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate uuid</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">uuid</a></span><h1>Macro <span class="macro">uuid</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/uuid/macros.rs.html#34-88">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! uuid {
($uuid:expr) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Parse <a href="https://docs.rs/uuid/*/uuid/struct.Uuid.html"><code>Uuid</code></a>s from string literals at compile time.</p>
<h3 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h3>
<p>This macro transforms the string literal representation of a
<a href="https://docs.rs/uuid/*/uuid/struct.Uuid.html"><code>Uuid</code></a> into the bytes representation, raising a compilation
error if it cannot properly be parsed.</p>
<h3 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h3>
<p>Setting a global constant:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub const </span>SCHEMA_ATTR_CLASS: Uuid = <span class="macro">uuid!</span>(<span class="string">"00000000-0000-0000-0000-ffff00000000"</span>);
<span class="kw">pub const </span>SCHEMA_ATTR_UUID: Uuid = <span class="macro">uuid!</span>(<span class="string">"00000000-0000-0000-0000-ffff00000001"</span>);
<span class="kw">pub const </span>SCHEMA_ATTR_NAME: Uuid = <span class="macro">uuid!</span>(<span class="string">"00000000-0000-0000-0000-ffff00000002"</span>);</code></pre></div>
<p>Defining a local variable:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uuid = <span class="macro">uuid!</span>(<span class="string">"urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4"</span>);</code></pre></div>
<p>Using a const variable:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">const </span>UUID_STR: <span class="kw-2">&amp;</span>str = <span class="string">"12345678-1234-5678-1234-567812345678"</span>;
<span class="kw">let </span>UUID = <span class="macro">uuid!</span>(UUID_STR);</code></pre></div>
<h3 id="compilation-failures"><a class="doc-anchor" href="#compilation-failures">§</a>Compilation Failures</h3>
<p>Invalid UUIDs are rejected:</p>
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile"></a><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uuid = <span class="macro">uuid!</span>(<span class="string">"F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4"</span>);</code></pre></div>
<p>Enable the feature <code>macro-diagnostics</code> to see the error messages below.</p>
<p>Provides the following compilation error:</p>
<div class="example-wrap"><pre class="language-txt"><code>error: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found Z at 9
|
| let id = uuid!(&quot;F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4&quot;);
| ^</code></pre></div></div></details></section></div></main></body></html>

1
uuid/sidebar-items.js Normal file
View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Variant","Version"],"macro":["uuid"],"mod":["fmt","timestamp"],"struct":["Builder","Error","Uuid"],"type":["Bytes"]};

235
uuid/struct.Builder.html Normal file

File diff suppressed because one or more lines are too long

18
uuid/struct.Error.html Normal file

File diff suppressed because one or more lines are too long

565
uuid/struct.Uuid.html Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,3 @@
<!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="The number of 100 nanosecond ticks between the RFC 9562 epoch (`1582-10-15 00:00:00`) and the Unix epoch (`1970-01-01 00:00:00`)."><title>UUID_TICKS_BETWEEN_EPOCHS in uuid::timestamp - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc constant"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In uuid::<wbr>timestamp</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">uuid</a>::<wbr><a href="index.html">timestamp</a></span><h1>Constant <span class="constant">UUID_TICKS_BETWEEN_EPOCHS</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/uuid/timestamp.rs.html#30">Source</a> </span></div><pre class="rust item-decl"><code>pub const UUID_TICKS_BETWEEN_EPOCHS: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a> = 0x01B2_1DD2_1381_4000;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The number of 100 nanosecond ticks between the RFC 9562 epoch
(<code>1582-10-15 00:00:00</code>) and the Unix epoch (<code>1970-01-01 00:00:00</code>).</p>
</div></details></section></div></main></body></html>

View file

@ -0,0 +1,2 @@
<!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="Default implementations for the `ClockSequence` trait."><title>uuid::timestamp::context - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../../../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module context</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In uuid::<wbr>timestamp</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../index.html">uuid</a>::<wbr><a href="../index.html">timestamp</a></span><h1>Module <span>context</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/uuid/timestamp.rs.html#439">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Default implementations for the <a href="../trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence"><code>ClockSequence</code></a> trait.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.NoContext.html" title="struct uuid::timestamp::context::NoContext">NoContext</a></div><div class="desc docblock-short">An empty counter that will always return the value <code>0</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ThreadLocalContext.html" title="struct uuid::timestamp::context::ThreadLocalContext">Thread<wbr>Local<wbr>Context</a></div><div class="desc docblock-short">A wrapper for a context that uses thread-local storage.</div></li></ul></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["NoContext","ThreadLocalContext"]};

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../../uuid/timestamp/context/struct.ThreadLocalContext.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../../uuid/timestamp/context/struct.ThreadLocalContext.html">../../../../uuid/timestamp/context/struct.ThreadLocalContext.html</a>...</p>
<script>location.replace("../../../../uuid/timestamp/context/struct.ThreadLocalContext.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

21
uuid/timestamp/index.html Normal file
View file

@ -0,0 +1,21 @@
<!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="Generating UUIDs from timestamps."><title>uuid::timestamp - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module timestamp</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#timestamp-representations-in-uuids" title="Timestamp representations in UUIDs">Timestamp representations in UUIDs</a></li><li><a href="#references" title="References">References</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate uuid</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">uuid</a></span><h1>Module <span>timestamp</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/uuid/timestamp.rs.html#1-972">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generating UUIDs from timestamps.</p>
<p>Timestamps are used in a few UUID versions as a source of decentralized
uniqueness (as in versions 1 and 6), and as a way to enable sorting (as
in versions 6 and 7). Timestamps arent encoded the same way by all UUID
versions so this module provides a single <a href="struct.Timestamp.html" title="struct uuid::timestamp::Timestamp"><code>Timestamp</code></a> type that can
convert between them.</p>
<h2 id="timestamp-representations-in-uuids"><a class="doc-anchor" href="#timestamp-representations-in-uuids">§</a>Timestamp representations in UUIDs</h2>
<p>Versions 1 and 6 UUIDs use a bespoke timestamp that consists of the
number of 100ns ticks since <code>1582-10-15 00:00:00</code>, along with
a counter value to avoid duplicates.</p>
<p>Version 7 UUIDs use a more standard timestamp that consists of the
number of millisecond ticks since the Unix epoch (<code>1970-01-01 00:00:00</code>).</p>
<h2 id="references"><a class="doc-anchor" href="#references">§</a>References</h2>
<ul>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-5.1">UUID Version 1 in RFC 9562</a></li>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-5.7">UUID Version 7 in RFC 9562</a></li>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-6.1">Timestamp Considerations in RFC 9562</a></li>
</ul>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="context/index.html" title="mod uuid::timestamp::context">context</a></div><div class="desc docblock-short">Default implementations for the <a href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence"><code>ClockSequence</code></a> trait.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Timestamp.html" title="struct uuid::timestamp::Timestamp">Timestamp</a></div><div class="desc docblock-short">A timestamp that can be encoded into a UUID.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.UUID_TICKS_BETWEEN_EPOCHS.html" title="constant uuid::timestamp::UUID_TICKS_BETWEEN_EPOCHS">UUID_<wbr>TICKS_<wbr>BETWEEN_<wbr>EPOCHS</a></div><div class="desc docblock-short">The number of 100 nanosecond ticks between the RFC 9562 epoch
(<code>1582-10-15 00:00:00</code>) and the Unix epoch (<code>1970-01-01 00:00:00</code>).</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">Clock<wbr>Sequence</a></div><div class="desc docblock-short">A counter that can be used by versions 1 and 6 UUIDs to support
the uniqueness of timestamps.</div></li></ul></section></div></main></body></html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"constant":["UUID_TICKS_BETWEEN_EPOCHS"],"mod":["context"],"struct":["Timestamp"],"trait":["ClockSequence"]};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,55 @@
<!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 counter that can be used by versions 1 and 6 UUIDs to support the uniqueness of timestamps."><title>ClockSequence in uuid::timestamp - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Clock<wbr>Sequence</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#references" title="References">References</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Output" title="Output">Output</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.generate_sequence" title="generate_sequence">generate_sequence</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.generate_timestamp_sequence" title="generate_timestamp_sequence">generate_timestamp_sequence</a></li><li><a href="#method.usable_bits" title="usable_bits">usable_bits</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ClockSequence-for-%26T" title="&#38;&#39;a T">&#38;&#39;a T</a></li><li><a href="#impl-ClockSequence-for-AssertUnwindSafe%3CC%3E" title="AssertUnwindSafe&#60;C&#62;">AssertUnwindSafe&#60;C&#62;</a></li><li><a href="#impl-ClockSequence-for-Mutex%3CC%3E" title="Mutex&#60;C&#62;">Mutex&#60;C&#62;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In uuid::<wbr>timestamp</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">uuid</a>::<wbr><a href="index.html">timestamp</a></span><h1>Trait <span class="trait">ClockSequence</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/uuid/timestamp.rs.html#372-413">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ClockSequence {
type <a href="#associatedtype.Output" class="associatedtype">Output</a>;
// Required method
fn <a href="#tymethod.generate_sequence" class="fn">generate_sequence</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -&gt; Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>;
// Provided methods
fn <a href="#method.generate_timestamp_sequence" class="fn">generate_timestamp_sequence</a>(
&amp;self,
seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>,
subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>,
) -&gt; (Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.usable_bits" class="fn">usable_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a>
<span class="where">where Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A counter that can be used by versions 1 and 6 UUIDs to support
the uniqueness of timestamps.</p>
<h2 id="references"><a class="doc-anchor" href="#references">§</a>References</h2>
<ul>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-5.1">UUID Version 1 in RFC 9562</a></li>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-5.6">UUID Version 6 in RFC 9562</a></li>
<li><a href="https://www.ietf.org/rfc/rfc9562.html#section-6.3">UUID Generator States in RFC 9562</a></li>
</ul>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Output" class="method"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#374">Source</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a></h4></section></summary><div class="docblock"><p>The type of sequence returned by this counter.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.generate_sequence" class="method"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#381">Source</a><h4 class="code-header">fn <a href="#tymethod.generate_sequence" class="fn">generate_sequence</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -&gt; Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section></summary><div class="docblock"><p>Get the next value in the sequence to feed into a timestamp.</p>
<p>This method will be called each time a <a href="struct.Timestamp.html" title="struct uuid::timestamp::Timestamp"><code>Timestamp</code></a> is constructed.</p>
<p>Any bits beyond <a href="trait.ClockSequence.html#method.usable_bits" title="method uuid::timestamp::ClockSequence::usable_bits"><code>ClockSequence::usable_bits</code></a> in the output must be unset.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.generate_timestamp_sequence" class="method"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#388-398">Source</a><h4 class="code-header">fn <a href="#method.generate_timestamp_sequence" class="fn">generate_timestamp_sequence</a>(
&amp;self,
seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>,
subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>,
) -&gt; (Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Get the next value in the sequence, potentially also adjusting the timestamp.</p>
<p>This method should be preferred over <code>generate_sequence</code>.</p>
<p>Any bits beyond <a href="trait.ClockSequence.html#method.usable_bits" title="method uuid::timestamp::ClockSequence::usable_bits"><code>ClockSequence::usable_bits</code></a> in the output must be unset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.usable_bits" class="method"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#407-412">Source</a><h4 class="code-header">fn <a href="#method.usable_bits" class="fn">usable_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a><div class="where">where
Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>The number of usable bits from the least significant bit in the result of <a href="trait.ClockSequence.html#tymethod.generate_sequence" title="method uuid::timestamp::ClockSequence::generate_sequence"><code>ClockSequence::generate_sequence</code></a>
or <a href="trait.ClockSequence.html#method.generate_timestamp_sequence" title="method uuid::timestamp::ClockSequence::generate_timestamp_sequence"><code>ClockSequence::generate_timestamp_sequence</code></a>.</p>
<p>The number of usable bits must not exceed 128.</p>
<p>The number of usable bits is not expected to change between calls. An implementation of <code>ClockSequence</code> should
always return the same value from this method.</p>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-ClockSequence-for-%26T" class="impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#415-436">Source</a><a href="#impl-ClockSequence-for-%26T" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T: <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> for <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.reference.html">&amp;'a T</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#416">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = &lt;T as <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>&gt;::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_sequence" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#418-420">Source</a><a href="#method.generate_sequence" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.generate_sequence" class="fn">generate_sequence</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -&gt; Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_timestamp_sequence-1" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#422-428">Source</a><a href="#method.generate_timestamp_sequence-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.generate_timestamp_sequence" class="fn">generate_timestamp_sequence</a>(
&amp;self,
seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>,
subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>,
) -&gt; (Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>)</h4></section><section id="method.usable_bits-1" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#430-435">Source</a><a href="#method.usable_bits-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.usable_bits" class="fn">usable_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a><div class="where">where
Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ClockSequence-for-Mutex%3CC%3E" class="impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#628-655">Source</a><a href="#impl-ClockSequence-for-Mutex%3CC%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>&gt; <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a>&lt;C&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#629">Source</a><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = &lt;C as <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>&gt;::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_sequence-1" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#631-635">Source</a><a href="#method.generate_sequence-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.generate_sequence" class="fn">generate_sequence</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -&gt; Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_timestamp_sequence-2" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#637-645">Source</a><a href="#method.generate_timestamp_sequence-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.generate_timestamp_sequence" class="fn">generate_timestamp_sequence</a>(
&amp;self,
seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>,
subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>,
) -&gt; (Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>)</h4></section><section id="method.usable_bits-2" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#647-654">Source</a><a href="#method.usable_bits-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.usable_bits" class="fn">usable_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a><div class="where">where
Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ClockSequence-for-AssertUnwindSafe%3CC%3E" class="impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#605-626">Source</a><a href="#impl-ClockSequence-for-AssertUnwindSafe%3CC%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>&gt; <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/struct.AssertUnwindSafe.html" title="struct core::panic::unwind_safe::AssertUnwindSafe">AssertUnwindSafe</a>&lt;C&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#606">Source</a><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = &lt;C as <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>&gt;::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_sequence-2" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#608-610">Source</a><a href="#method.generate_sequence-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.generate_sequence" class="fn">generate_sequence</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>) -&gt; Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section><section id="method.generate_timestamp_sequence-3" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#612-618">Source</a><a href="#method.generate_timestamp_sequence-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.generate_timestamp_sequence" class="fn">generate_timestamp_sequence</a>(
&amp;self,
seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>,
subsec_nanos: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>,
) -&gt; (Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u32.html">u32</a>)</h4></section><section id="method.usable_bits-3" class="method trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#620-625">Source</a><a href="#method.usable_bits-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.usable_bits" class="fn">usable_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.usize.html">usize</a><div class="where">where
Self::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a>: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-ClockSequence-for-NoContext" class="impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#916-926">Source</a><a href="#impl-ClockSequence-for-NoContext" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> for <a class="struct" href="context/struct.NoContext.html" title="struct uuid::timestamp::context::NoContext">NoContext</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#917">Source</a><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u16.html">u16</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ClockSequence-for-ThreadLocalContext%3CC%3E" class="impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#583-603">Source</a><a href="#impl-ClockSequence-for-ThreadLocalContext%3CC%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> + 'static&gt; <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a> for <a class="struct" href="context/struct.ThreadLocalContext.html" title="struct uuid::timestamp::context::ThreadLocalContext">ThreadLocalContext</a>&lt;C&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Output-5" class="associatedtype trait-impl"><a class="src rightside" href="../../src/uuid/timestamp.rs.html#584">Source</a><a href="#associatedtype.Output-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = &lt;C as <a class="trait" href="trait.ClockSequence.html" title="trait uuid::timestamp::ClockSequence">ClockSequence</a>&gt;::<a class="associatedtype" href="trait.ClockSequence.html#associatedtype.Output" title="type uuid::timestamp::ClockSequence::Output">Output</a></h4></section></div></details></div><script src="../../trait.impl/uuid/timestamp/trait.ClockSequence.js" data-ignore-extern-crates="core,std" async></script></section></div></main></body></html>

4
uuid/type.Bytes.html Normal file
View file

@ -0,0 +1,4 @@
<!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 128-bit (16 byte) buffer containing the UUID."><title>Bytes in uuid - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="uuid" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc type"><!--[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" title="show sidebar"></button><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../uuid/index.html"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></a><h2><a href="../uuid/index.html">uuid</a><span class="version">1.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Bytes</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#abi" title="ABI">ABI</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate uuid</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">uuid</a></span><h1>Type Alias <span class="type">Bytes</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/uuid/lib.rs.html#291">Source</a> </span></div><pre class="rust item-decl"><code>pub type Bytes = [<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.array.html">16</a>];</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A 128-bit (16 byte) buffer containing the UUID.</p>
<h2 id="abi"><a class="doc-anchor" href="#abi">§</a>ABI</h2>
<p>The <code>Bytes</code> type is always guaranteed to be have the same ABI as <a href="struct.Uuid.html" title="struct uuid::Uuid"><code>Uuid</code></a>.</p>
</div></details></section></div></main></body></html>