| <!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 Universally Unique Identifier (UUID)."><meta name="keywords" content="rust, rustlang, rust-lang, Uuid"><title>Uuid in uuid - 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="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" href="../uuid/index.html"><div class="logo-container"><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../uuid/index.html"><div class="logo-container"> |
| <img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="logo"></div></a><h2 class="location"><a href="#">Uuid</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.NAMESPACE_DNS">NAMESPACE_DNS</a></li><li><a href="#associatedconstant.NAMESPACE_OID">NAMESPACE_OID</a></li><li><a href="#associatedconstant.NAMESPACE_URL">NAMESPACE_URL</a></li><li><a href="#associatedconstant.NAMESPACE_X500">NAMESPACE_X500</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_fields">as_fields</a></li><li><a href="#method.as_u128">as_u128</a></li><li><a href="#method.encode_buffer">encode_buffer</a></li><li><a href="#method.from_bytes">from_bytes</a></li><li><a href="#method.from_fields">from_fields</a></li><li><a href="#method.from_fields_le">from_fields_le</a></li><li><a href="#method.from_slice">from_slice</a></li><li><a href="#method.from_u128">from_u128</a></li><li><a href="#method.from_u128_le">from_u128_le</a></li><li><a href="#method.get_variant">get_variant</a></li><li><a href="#method.get_version">get_version</a></li><li><a href="#method.get_version_num">get_version_num</a></li><li><a href="#method.is_nil">is_nil</a></li><li><a href="#method.new_v4">new_v4</a></li><li><a href="#method.new_v5">new_v5</a></li><li><a href="#method.nil">nil</a></li><li><a href="#method.parse_str">parse_str</a></li><li><a href="#method.to_fields_le">to_fields_le</a></li><li><a href="#method.to_hyphenated">to_hyphenated</a></li><li><a href="#method.to_hyphenated_ref">to_hyphenated_ref</a></li><li><a href="#method.to_simple">to_simple</a></li><li><a href="#method.to_simple_ref">to_simple_ref</a></li><li><a href="#method.to_u128_le">to_u128_le</a></li><li><a href="#method.to_urn">to_urn</a></li><li><a href="#method.to_urn_ref">to_urn_ref</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Uuid">Clone</a></li><li><a href="#impl-Copy-for-Uuid">Copy</a></li><li><a href="#impl-Debug-for-Uuid">Debug</a></li><li><a href="#impl-Default-for-Uuid">Default</a></li><li><a href="#impl-Deserialize%3C%27de%3E-for-Uuid">Deserialize<'de></a></li><li><a href="#impl-Display-for-Uuid">Display</a></li><li><a href="#impl-Eq-for-Uuid">Eq</a></li><li><a href="#impl-From%3C%26%27a%20Uuid%3E-for-HyphenatedRef%3C%27a%3E">From<&'a Uuid></a></li><li><a href="#impl-From%3C%26%27a%20Uuid%3E-for-SimpleRef%3C%27a%3E">From<&'a Uuid></a></li><li><a href="#impl-From%3C%26%27a%20Uuid%3E-for-UrnRef%3C%27a%3E">From<&'a Uuid></a></li><li><a href="#impl-From%3CUuid%3E-for-Hyphenated">From<Uuid></a></li><li><a href="#impl-From%3CUuid%3E-for-Simple">From<Uuid></a></li><li><a href="#impl-From%3CUuid%3E-for-Urn">From<Uuid></a></li><li><a href="#impl-FromStr-for-Uuid">FromStr</a></li><li><a href="#impl-Hash-for-Uuid">Hash</a></li><li><a href="#impl-LowerHex-for-Uuid">LowerHex</a></li><li><a href="#impl-Ord-for-Uuid">Ord</a></li><li><a href="#impl-PartialEq%3CUuid%3E-for-Uuid">PartialEq<Uuid></a></li><li><a href="#impl-PartialOrd%3CUuid%3E-for-Uuid">PartialOrd<Uuid></a></li><li><a href="#impl-Serialize-for-Uuid">Serialize</a></li><li><a href="#impl-StructuralEq-for-Uuid">StructuralEq</a></li><li><a href="#impl-StructuralPartialEq-for-Uuid">StructuralPartialEq</a></li><li><a href="#impl-UpperHex-for-Uuid">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Uuid">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Uuid">Send</a></li><li><a href="#impl-Sync-for-Uuid">Sync</a></li><li><a href="#impl-Unpin-for-Uuid">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Uuid">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Uuid">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Uuid">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Uuid">BorrowMut<T></a></li><li><a href="#impl-DeserializeOwned-for-Uuid">DeserializeOwned</a></li><li><a href="#impl-From%3CT%3E-for-Uuid">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Uuid">Into<U></a></li><li><a href="#impl-ToOwned-for-Uuid">ToOwned</a></li><li><a href="#impl-ToString-for-Uuid">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Uuid">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Uuid">TryInto<U></a></li></ul></section><h2><a href="index.html">In uuid</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">uuid</a>::<wbr><a class="struct" href="#">Uuid</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/uuid/lib.rs.html#261">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code><div class="code-attribute">#[repr(transparent)]</div>pub struct Uuid(_);</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A Universally Unique Identifier (UUID).</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-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#21-258">source</a><a href="#impl-Uuid" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.nil" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#43-45">source</a><h4 class="code-header">pub const fn <a href="#method.nil" class="fnname">nil</a>() -> Self</h4></section></summary><div class="docblock"><p>The ‘nil UUID’.</p> |
| <p>The nil UUID is special form of UUID that is specified to have all |
| 128 bits set to zero, as defined in <a href="https://tools.ietf.org/html/rfc4122.html#section-4.1.7">IETF RFC 4122 Section 4.1.7</a>.</p> |
| <h5 id="examples"><a href="#examples">Examples</a></h5> |
| <p>Basic usage:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>uuid = Uuid::nil(); |
| |
| <span class="macro">assert_eq!</span>( |
| uuid.to_hyphenated().to_string(), |
| <span class="string">"00000000-0000-0000-0000-000000000000" |
| </span>);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_fields" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#70-102">source</a><h4 class="code-header">pub fn <a href="#method.from_fields" class="fnname">from_fields</a>(d1: u32, d2: u16, d3: u16, d4: &[u8]) -> Result<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>, <a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a>></h4></section></summary><div class="docblock"><p>Creates a UUID from four field values in big-endian order.</p> |
| <h5 id="errors"><a href="#errors">Errors</a></h5> |
| <p>This function will return an error if <code>d4</code>’s length is not 8 bytes.</p> |
| <h5 id="examples-1"><a href="#examples-1">Examples</a></h5> |
| <p>Basic usage:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>d4 = [<span class="number">12</span>, <span class="number">3</span>, <span class="number">9</span>, <span class="number">56</span>, <span class="number">54</span>, <span class="number">43</span>, <span class="number">8</span>, <span class="number">9</span>]; |
| |
| <span class="kw">let </span>uuid = Uuid::from_fields(<span class="number">42</span>, <span class="number">12</span>, <span class="number">5</span>, <span class="kw-2">&</span>d4); |
| <span class="kw">let </span>uuid = uuid.map(|uuid| uuid.to_hyphenated().to_string()); |
| |
| <span class="kw">let </span>expected_uuid = |
| <span class="prelude-val">Ok</span>(String::from(<span class="string">"0000002a-000c-0005-0c03-0938362b0809"</span>)); |
| |
| <span class="macro">assert_eq!</span>(expected_uuid, uuid);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_fields_le" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#127-159">source</a><h4 class="code-header">pub fn <a href="#method.from_fields_le" class="fnname">from_fields_le</a>(d1: u32, d2: u16, d3: u16, d4: &[u8]) -> Result<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>, <a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a>></h4></section></summary><div class="docblock"><p>Creates a UUID from four field values in little-endian order.</p> |
| <p>The bytes in the <code>d1</code>, <code>d2</code> and <code>d3</code> fields will |
| be converted into big-endian order.</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="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>d1 = <span class="number">0xAB3F1097u32</span>; |
| <span class="kw">let </span>d2 = <span class="number">0x501Eu16</span>; |
| <span class="kw">let </span>d3 = <span class="number">0xB736u16</span>; |
| <span class="kw">let </span>d4 = [<span class="number">12</span>, <span class="number">3</span>, <span class="number">9</span>, <span class="number">56</span>, <span class="number">54</span>, <span class="number">43</span>, <span class="number">8</span>, <span class="number">9</span>]; |
| |
| <span class="kw">let </span>uuid = Uuid::from_fields_le(d1, d2, d3, <span class="kw-2">&</span>d4); |
| <span class="kw">let </span>uuid = uuid.map(|uuid| uuid.to_hyphenated().to_string()); |
| |
| <span class="kw">let </span>expected_uuid = |
| <span class="prelude-val">Ok</span>(String::from(<span class="string">"97103fab-1e50-36b7-0c03-0938362b0809"</span>)); |
| |
| <span class="macro">assert_eq!</span>(expected_uuid, uuid);</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_u128" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#162-181">source</a><h4 class="code-header">pub const fn <a href="#method.from_u128" class="fnname">from_u128</a>(v: u128) -> Self</h4></section></summary><div class="docblock"><p>Creates a UUID from a 128bit value in big-endian order.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_u128_le" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#184-203">source</a><h4 class="code-header">pub const fn <a href="#method.from_u128_le" class="fnname">from_u128_le</a>(v: u128) -> Self</h4></section></summary><div class="docblock"><p>Creates a UUID from a 128bit value in little-endian order.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#240-252">source</a><h4 class="code-header">pub fn <a href="#method.from_slice" class="fnname">from_slice</a>(b: &[u8]) -> Result<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>, <a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a>></h4></section></summary><div class="docblock"><p>Creates a UUID using the supplied big-endian bytes.</p> |
| <h5 id="errors-1"><a href="#errors-1">Errors</a></h5> |
| <p>This function will return an error if <code>b</code> has any length other than 16.</p> |
| <h5 id="examples-3"><a href="#examples-3">Examples</a></h5> |
| <p>Basic usage:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>bytes = [<span class="number">4</span>, <span class="number">54</span>, <span class="number">67</span>, <span class="number">12</span>, <span class="number">43</span>, <span class="number">2</span>, <span class="number">98</span>, <span class="number">76</span>, <span class="number">32</span>, <span class="number">50</span>, <span class="number">87</span>, <span class="number">5</span>, <span class="number">1</span>, <span class="number">33</span>, <span class="number">43</span>, <span class="number">87</span>]; |
| |
| <span class="kw">let </span>uuid = Uuid::from_slice(<span class="kw-2">&</span>bytes); |
| <span class="kw">let </span>uuid = uuid.map(|uuid| uuid.to_hyphenated().to_string()); |
| |
| <span class="kw">let </span>expected_uuid = |
| <span class="prelude-val">Ok</span>(String::from(<span class="string">"0436430c-2b02-624c-2032-570501212b57"</span>)); |
| |
| <span class="macro">assert_eq!</span>(expected_uuid, uuid);</code></pre></div> |
| <p>An incorrect number of bytes:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>bytes = [<span class="number">4</span>, <span class="number">54</span>, <span class="number">67</span>, <span class="number">12</span>, <span class="number">43</span>, <span class="number">2</span>, <span class="number">98</span>, <span class="number">76</span>]; |
| |
| <span class="kw">let </span>uuid = Uuid::from_slice(<span class="kw-2">&</span>bytes); |
| |
| <span class="macro">assert!</span>(uuid.is_err());</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_bytes" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/builder/mod.rs.html#255-257">source</a><h4 class="code-header">pub const fn <a href="#method.from_bytes" class="fnname">from_bytes</a>(bytes: <a class="type" href="type.Bytes.html" title="type uuid::Bytes">Bytes</a>) -> <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h4></section></summary><div class="docblock"><p>Creates a UUID using the supplied big-endian bytes.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uuid-1" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/parser/mod.rs.html#51-200">source</a><a href="#impl-Uuid-1" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.parse_str" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/parser/mod.rs.html#57-199">source</a><h4 class="code-header">pub fn <a href="#method.parse_str" class="fnname">parse_str</a>(input: &str) -> Result<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>, <a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a>></h4></section></summary><div class="docblock"><p>Parses a <code>Uuid</code> from a string of hexadecimal digits with optional |
| hyphens.</p> |
| <p>Any of the formats generated by this module (simple, hyphenated, urn) |
| are supported by this parsing function.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uuid-2" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#68-118">source</a><a href="#impl-Uuid-2" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_hyphenated" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#73-75">source</a><h4 class="code-header">pub const fn <a href="#method.to_hyphenated" class="fnname">to_hyphenated</a>(self) -> <a class="struct" href="adapter/struct.Hyphenated.html" title="struct uuid::adapter::Hyphenated">Hyphenated</a></h4></section></summary><div class="docblock"><p>Get a <a href="adapter/struct.Hyphenated.html"><code>Hyphenated</code></a> formatter.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_hyphenated_ref" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#81-83">source</a><h4 class="code-header">pub const fn <a href="#method.to_hyphenated_ref" class="fnname">to_hyphenated_ref</a>(&self) -> <a class="struct" href="adapter/struct.HyphenatedRef.html" title="struct uuid::adapter::HyphenatedRef">HyphenatedRef</a><'_></h4></section></summary><div class="docblock"><p>Get a borrowed <a href="adapter/struct.HyphenatedRef.html"><code>HyphenatedRef</code></a> formatter.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_simple" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#89-91">source</a><h4 class="code-header">pub const fn <a href="#method.to_simple" class="fnname">to_simple</a>(self) -> <a class="struct" href="adapter/struct.Simple.html" title="struct uuid::adapter::Simple">Simple</a></h4></section></summary><div class="docblock"><p>Get a <a href="adapter/struct.Simple.html"><code>Simple</code></a> formatter.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_simple_ref" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#97-99">source</a><h4 class="code-header">pub const fn <a href="#method.to_simple_ref" class="fnname">to_simple_ref</a>(&self) -> <a class="struct" href="adapter/struct.SimpleRef.html" title="struct uuid::adapter::SimpleRef">SimpleRef</a><'_></h4></section></summary><div class="docblock"><p>Get a borrowed <a href="adapter/struct.SimpleRef.html"><code>SimpleRef</code></a> formatter.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_urn" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#106-108">source</a><h4 class="code-header">pub const fn <a href="#method.to_urn" class="fnname">to_urn</a>(self) -> <a class="struct" href="adapter/struct.Urn.html" title="struct uuid::adapter::Urn">Urn</a></h4></section></summary><div class="docblock"><p>Get a <a href="adapter/struct.Urn.html"><code>Urn</code></a> formatter.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_urn_ref" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#115-117">source</a><h4 class="code-header">pub const fn <a href="#method.to_urn_ref" class="fnname">to_urn_ref</a>(&self) -> <a class="struct" href="adapter/struct.UrnRef.html" title="struct uuid::adapter::UrnRef">UrnRef</a><'_></h4></section></summary><div class="docblock"><p>Get a borrowed <a href="adapter/struct.UrnRef.html"><code>UrnRef</code></a> formatter.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uuid-3" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/v4.rs.html#3-39">source</a><a href="#impl-Uuid-3" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_v4" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/v4.rs.html#27-38">source</a><h4 class="code-header">pub fn <a href="#method.new_v4" class="fnname">new_v4</a>() -> <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h4></section></summary><div class="docblock"><p>Creates a random UUID.</p> |
| <p>This uses the <a href="https://crates.io/crates/getrandom"><code>getrandom</code></a> crate to utilise the operating system’s RNG |
| as the source of random numbers. If you’d like to use a custom |
| generator, don’t use this method: generate random bytes using your |
| custom generator and pass them to the |
| <a href="struct.Builder.html#method.from_bytes"><code>uuid::Builder::from_bytes</code></a> function instead.</p> |
| <p>Note that usage of this method requires the <code>v4</code> feature of this crate |
| to be enabled.</p> |
| <h5 id="examples-4"><a href="#examples-4">Examples</a></h5> |
| <p>Basic usage:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>uuid::Uuid; |
| |
| <span class="kw">let </span>uuid = Uuid::new_v4();</code></pre></div> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uuid-4" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/v5.rs.html#4-39">source</a><a href="#impl-Uuid-4" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_v5" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/v5.rs.html#21-38">source</a><h4 class="code-header">pub fn <a href="#method.new_v5" class="fnname">new_v5</a>(namespace: &<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>, name: &[u8]) -> <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h4></section></summary><div class="docblock"><p>Creates a UUID using a name from a namespace, based on the SHA-1 hash.</p> |
| <p>A number of namespaces are available as constants in this crate:</p> |
| <ul> |
| <li><a href="struct.Uuid.html#associatedconst.NAMESPACE_DNS"><code>NAMESPACE_DNS</code></a></li> |
| <li><a href="struct.Uuid.html#associatedconst.NAMESPACE_OID"><code>NAMESPACE_OID</code></a></li> |
| <li><a href="struct.Uuid.html#associatedconst.NAMESPACE_URL"><code>NAMESPACE_URL</code></a></li> |
| <li><a href="struct.Uuid.html#associatedconst.NAMESPACE_X500"><code>NAMESPACE_X500</code></a></li> |
| </ul> |
| <p>Note that usage of this method requires the <code>v5</code> feature of this crate |
| to be enabled.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uuid-5" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#263-554">source</a><a href="#impl-Uuid-5" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedconstant.NAMESPACE_DNS" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#265-268">source</a><h4 class="code-header">pub const <a href="#associatedconstant.NAMESPACE_DNS" class="constant">NAMESPACE_DNS</a>: Self = _</h4></section></summary><div class="docblock"><p>UUID namespace for Domain Name System (DNS).</p> |
| </div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.NAMESPACE_OID" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#271-274">source</a><h4 class="code-header">pub const <a href="#associatedconstant.NAMESPACE_OID" class="constant">NAMESPACE_OID</a>: Self = _</h4></section></summary><div class="docblock"><p>UUID namespace for ISO Object Identifiers (OIDs).</p> |
| </div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.NAMESPACE_URL" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#277-280">source</a><h4 class="code-header">pub const <a href="#associatedconstant.NAMESPACE_URL" class="constant">NAMESPACE_URL</a>: Self = _</h4></section></summary><div class="docblock"><p>UUID namespace for Uniform Resource Locators (URLs).</p> |
| </div></details><details class="rustdoc-toggle" open><summary><section id="associatedconstant.NAMESPACE_X500" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#283-286">source</a><h4 class="code-header">pub const <a href="#associatedconstant.NAMESPACE_X500" class="constant">NAMESPACE_X500</a>: Self = _</h4></section></summary><div class="docblock"><p>UUID namespace for X.500 Distinguished Names (DNs).</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_variant" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#294-302">source</a><h4 class="code-header">pub fn <a href="#method.get_variant" class="fnname">get_variant</a>(&self) -> Option<<a class="enum" href="enum.Variant.html" title="enum uuid::Variant">Variant</a>></h4></section></summary><div class="docblock"><p>Returns the variant of the UUID structure.</p> |
| <p>This determines the interpretation of the structure of the UUID. |
| Currently only the RFC4122 variant is generated by this module.</p> |
| <ul> |
| <li><a href="http://tools.ietf.org/html/rfc4122#section-4.1.1">Variant Reference</a></li> |
| </ul> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_version_num" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#315-317">source</a><h4 class="code-header">pub const fn <a href="#method.get_version_num" class="fnname">get_version_num</a>(&self) -> usize</h4></section></summary><div class="docblock"><p>Returns the version number of the UUID.</p> |
| <p>This represents the algorithm used to generate the contents.</p> |
| <p>Currently only the Random (V4) algorithm is supported by this |
| module. There are security and privacy implications for using |
| older versions - see <a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">Wikipedia: Universally Unique Identifier</a> for |
| details.</p> |
| <ul> |
| <li><a href="http://tools.ietf.org/html/rfc4122#section-4.1.3">Version Reference</a></li> |
| </ul> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_version" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#322-333">source</a><h4 class="code-header">pub fn <a href="#method.get_version" class="fnname">get_version</a>(&self) -> Option<<a class="enum" href="enum.Version.html" title="enum uuid::Version">Version</a>></h4></section></summary><div class="docblock"><p>Returns the version of the UUID.</p> |
| <p>This represents the algorithm used to generate the contents</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_fields" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#378-393">source</a><h4 class="code-header">pub fn <a href="#method.as_fields" class="fnname">as_fields</a>(&self) -> (u32, u16, u16, &[u8; 8])</h4></section></summary><div class="docblock"><p>Returns the four field values of the UUID in big-endian order.</p> |
| <p>These values can be passed to the <code>from_fields()</code> method to get the |
| original <code>Uuid</code> back.</p> |
| <ul> |
| <li>The first field value represents the first group of (eight) hex |
| digits, taken as a big-endian <code>u32</code> value. For V1 UUIDs, this field |
| represents the low 32 bits of the timestamp.</li> |
| <li>The second field value represents the second group of (four) hex |
| digits, taken as a big-endian <code>u16</code> value. For V1 UUIDs, this field |
| represents the middle 16 bits of the timestamp.</li> |
| <li>The third field value represents the third group of (four) hex digits, |
| taken as a big-endian <code>u16</code> value. The 4 most significant bits give |
| the UUID version, and for V1 UUIDs, the last 12 bits represent the |
| high 12 bits of the timestamp.</li> |
| <li>The last field value represents the last two groups of four and twelve |
| hex digits, taken in order. The first 1-3 bits of this indicate the |
| UUID variant, and for V1 UUIDs, the next 13-15 bits indicate the clock |
| sequence and the last 48 bits indicate the node ID.</li> |
| </ul> |
| <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>uuid::Uuid; |
| |
| <span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), uuid::Error> { |
| <span class="kw">let </span>uuid = Uuid::nil(); |
| <span class="macro">assert_eq!</span>(uuid.as_fields(), (<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="kw-2">&</span>[<span class="number">0u8</span>; <span class="number">8</span>])); |
| |
| <span class="kw">let </span>uuid = Uuid::parse_str(<span class="string">"936DA01F-9ABD-4D9D-80C7-02AF85C822A8"</span>)<span class="question-mark">?</span>; |
| <span class="macro">assert_eq!</span>( |
| uuid.as_fields(), |
| ( |
| <span class="number">0x936DA01F</span>, |
| <span class="number">0x9ABD</span>, |
| <span class="number">0x4D9D</span>, |
| <span class="string">b"\x80\xC7\x02\xAF\x85\xC8\x22\xA8" |
| </span>) |
| ); |
| |
| <span class="prelude-val">Ok</span>(()) |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_fields_le" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#419-434">source</a><h4 class="code-header">pub fn <a href="#method.to_fields_le" class="fnname">to_fields_le</a>(&self) -> (u32, u16, u16, &[u8; 8])</h4></section></summary><div class="docblock"><p>Returns the four field values of the UUID in little-endian order.</p> |
| <p>The bytes in the returned integer fields will |
| be converted from big-endian order.</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>uuid::Uuid; |
| |
| <span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), uuid::Error> { |
| <span class="kw">let </span>uuid = Uuid::parse_str(<span class="string">"936DA01F-9ABD-4D9D-80C7-02AF85C822A8"</span>)<span class="question-mark">?</span>; |
| <span class="macro">assert_eq!</span>( |
| uuid.to_fields_le(), |
| ( |
| <span class="number">0x1FA06D93</span>, |
| <span class="number">0xBD9A</span>, |
| <span class="number">0x9D4D</span>, |
| <span class="string">b"\x80\xC7\x02\xAF\x85\xC8\x22\xA8" |
| </span>) |
| ); |
| <span class="prelude-val">Ok</span>(()) |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_u128" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#455-472">source</a><h4 class="code-header">pub fn <a href="#method.as_u128" class="fnname">as_u128</a>(&self) -> u128</h4></section></summary><div class="docblock"><p>Returns a 128bit value containing the UUID data.</p> |
| <p>The bytes in the UUID will be packed into a <code>u128</code>, like the |
| <a href="struct.Uuid.html#method.as_bytes" title="Uuid::as_bytes"><code>Uuid::as_bytes</code></a> method.</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>uuid::Uuid; |
| |
| <span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), uuid::Error> { |
| <span class="kw">let </span>uuid = Uuid::parse_str(<span class="string">"936DA01F-9ABD-4D9D-80C7-02AF85C822A8"</span>)<span class="question-mark">?</span>; |
| <span class="macro">assert_eq!</span>( |
| uuid.as_u128(), |
| <span class="number">0x936DA01F9ABD4D9D80C702AF85C822A8</span>, |
| ); |
| <span class="prelude-val">Ok</span>(()) |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_u128_le" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#496-513">source</a><h4 class="code-header">pub fn <a href="#method.to_u128_le" class="fnname">to_u128_le</a>(&self) -> u128</h4></section></summary><div class="docblock"><p>Returns a 128bit little-endian value containing the UUID data.</p> |
| <p>The bytes in the UUID will be reversed and packed into a <code>u128</code>. |
| Note that this will produce a different result than |
| <a href="struct.Uuid.html#method.to_fields_le" title="Uuid::to_fields_le"><code>Uuid::to_fields_le</code></a>, because the entire UUID is reversed, rather |
| than reversing the individual fields in-place.</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>uuid::Uuid; |
| |
| <span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), uuid::Error> { |
| <span class="kw">let </span>uuid = Uuid::parse_str(<span class="string">"936DA01F-9ABD-4D9D-80C7-02AF85C822A8"</span>)<span class="question-mark">?</span>; |
| |
| <span class="macro">assert_eq!</span>( |
| uuid.to_u128_le(), |
| <span class="number">0xA822C885AF02C7809D4DBD9A1FA06D93</span>, |
| ); |
| <span class="prelude-val">Ok</span>(()) |
| }</code></pre></div> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_bytes" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#516-518">source</a><h4 class="code-header">pub const fn <a href="#method.as_bytes" class="fnname">as_bytes</a>(&self) -> &<a class="type" href="type.Bytes.html" title="type uuid::Bytes">Bytes</a></h4></section></summary><div class="docblock"><p>Returns an array of 16 octets containing the UUID data.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_nil" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#521-523">source</a><h4 class="code-header">pub fn <a href="#method.is_nil" class="fnname">is_nil</a>(&self) -> bool</h4></section></summary><div class="docblock"><p>Tests if the UUID is nil.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.encode_buffer" class="method has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#551-553">source</a><h4 class="code-header">pub const fn <a href="#method.encode_buffer" class="fnname">encode_buffer</a>() -> [u8; 45]</h4></section></summary><div class="docblock"><p>A buffer that can be used for <code>encode_...</code> calls, that is |
| guaranteed to be long enough for any of the adapters.</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>uuid::Uuid; |
| |
| <span class="kw">let </span>uuid = Uuid::nil(); |
| |
| <span class="macro">assert_eq!</span>( |
| uuid.to_simple().encode_lower(<span class="kw-2">&mut </span>Uuid::encode_buffer()), |
| <span class="string">"00000000000000000000000000000000" |
| </span>); |
| |
| <span class="macro">assert_eq!</span>( |
| uuid.to_hyphenated() |
| .encode_lower(<span class="kw-2">&mut </span>Uuid::encode_buffer()), |
| <span class="string">"00000000-0000-0000-0000-000000000000" |
| </span>); |
| |
| <span class="macro">assert_eq!</span>( |
| uuid.to_urn().encode_lower(<span class="kw-2">&mut </span>Uuid::encode_buffer()), |
| <span class="string">"urn:uuid:00000000-0000-0000-0000-000000000000" |
| </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-Clone-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-Clone-for-Uuid" class="anchor"></a><h3 class="code-header">impl Clone for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">clone_from</a>(&mut self, source: &Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#556-561">source</a><a href="#impl-Debug-for-Uuid" class="anchor"></a><h3 class="code-header">impl Debug for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#558-560">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#601-606">source</a><a href="#impl-Default-for-Uuid" class="anchor"></a><h3 class="code-header">impl Default for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#603-605">source</a><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a class="fnname">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/serde_support.rs.html#30-91">source</a><a href="#impl-Deserialize%3C%27de%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<'de> <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/serde_support.rs.html#31-90">source</a><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="../serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><D: <a class="trait" href="../serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>>(deserializer: D) -> Result<Self, D::<a class="associatedtype" href="../serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="../serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#563-567">source</a><a href="#impl-Display-for-Uuid" class="anchor"></a><h3 class="code-header">impl Display for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#564-566">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20Uuid%3E-for-HyphenatedRef%3C%27a%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3C%26%27a%20Uuid%3E-for-HyphenatedRef%3C%27a%3E" class="anchor"></a><h3 class="code-header">impl<'a> From<&'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.HyphenatedRef.html" title="struct uuid::adapter::HyphenatedRef">HyphenatedRef</a><'a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: &'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20Uuid%3E-for-SimpleRef%3C%27a%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3C%26%27a%20Uuid%3E-for-SimpleRef%3C%27a%3E" class="anchor"></a><h3 class="code-header">impl<'a> From<&'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.SimpleRef.html" title="struct uuid::adapter::SimpleRef">SimpleRef</a><'a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from-3" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: &'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20Uuid%3E-for-UrnRef%3C%27a%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3C%26%27a%20Uuid%3E-for-UrnRef%3C%27a%3E" class="anchor"></a><h3 class="code-header">impl<'a> From<&'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.UrnRef.html" title="struct uuid::adapter::UrnRef">UrnRef</a><'a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from-5" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: &'a <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CUuid%3E-for-Hyphenated" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3CUuid%3E-for-Hyphenated" class="anchor"></a><h3 class="code-header">impl From<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.Hyphenated.html" title="struct uuid::adapter::Hyphenated">Hyphenated</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CUuid%3E-for-Simple" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3CUuid%3E-for-Simple" class="anchor"></a><h3 class="code-header">impl From<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.Simple.html" title="struct uuid::adapter::Simple">Simple</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CUuid%3E-for-Urn" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#impl-From%3CUuid%3E-for-Urn" class="anchor"></a><h3 class="code-header">impl From<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="adapter/struct.Urn.html" title="struct uuid::adapter::Urn">Urn</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/adapter/mod.rs.html#934-941">source</a><a href="#method.from-4" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(f: <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromStr-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#593-599">source</a><a href="#impl-FromStr-for-Uuid" class="anchor"></a><h3 class="code-header">impl FromStr for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Err" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Err" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Err</a> = <a class="struct" href="struct.Error.html" title="struct uuid::Error">Error</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_str" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#596-598">source</a><a href="#method.from_str" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from_str</a>(uuid_str: &str) -> Result<Self, Self::Err></h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-Hash-for-Uuid" class="anchor"></a><h3 class="code-header">impl Hash for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#method.hash" class="anchor"></a><h4 class="code-header">fn <a class="fnname">hash</a><__H: Hasher>(&self, state: &mut __H)</h4></section></summary><div class='docblock'>Feeds this value into the given [<code>Hasher</code>]. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.3.0">1.3.0</span><a href="#method.hash_slice" class="anchor"></a><h4 class="code-header">fn <a class="fnname">hash_slice</a><H>(data: &[Self], state: &mut H)<span class="where fmt-newline">where<br> H: Hasher,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given [<code>Hasher</code>]. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#580-584">source</a><a href="#impl-LowerHex-for-Uuid" class="anchor"></a><h3 class="code-header">impl LowerHex for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#581-583">source</a><a href="#method.fmt-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-Ord-for-Uuid" class="anchor"></a><h3 class="code-header">impl Ord for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a class="fnname">cmp</a>(&self, other: &<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Ordering</h4></section></summary><div class='docblock'>This method returns an [<code>Ordering</code>] between <code>self</code> and <code>other</code>. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.max" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">max</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.21.0">1.21.0</span><a href="#method.min" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">min</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="since rightside" title="Stable since Rust version 1.50.0">1.50.0</span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">clamp</a>(self, min: Self, max: Self) -> Self<span class="where fmt-newline">where<br> Self: PartialOrd<Self>,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUuid%3E-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-PartialEq%3CUuid%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl PartialEq<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> bool</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>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="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ne" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">ne</a>(&self, other: &Rhs) -> bool</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>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CUuid%3E-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-PartialOrd%3CUuid%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl PartialOrd<<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>> for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</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="../src/uuid/lib.rs.html#259">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a class="fnname">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a>) -> Option<Ordering></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a>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="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.lt" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">lt</a>(&self, other: &Rhs) -> bool</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><</code> operator. <a>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="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.le" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">le</a>(&self, other: &Rhs) -> bool</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><=</code> |
| operator. <a>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="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.gt" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">gt</a>(&self, other: &Rhs) -> bool</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>></code> operator. <a>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="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.ge" class="anchor"></a><h4 class="code-header">const fn <a class="fnname">ge</a>(&self, other: &Rhs) -> bool</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>>=</code> |
| operator. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Serialize-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/serde_support.rs.html#16-28">source</a><a href="#impl-Serialize-for-Uuid" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</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="../src/uuid/serde_support.rs.html#17-27">source</a><a href="#method.serialize" class="anchor"></a><h4 class="code-header">fn <a href="../serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><S: <a class="trait" href="../serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>>(&self, serializer: S) -> Result<S::<a class="associatedtype" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, S::<a class="associatedtype" href="../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>></h4></section></summary><div class='docblock'>Serialize this value into the given Serde serializer. <a href="../serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#586-591">source</a><a href="#impl-UpperHex-for-Uuid" class="anchor"></a><h3 class="code-header">impl UpperHex for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#588-590">source</a><a href="#method.fmt-3" class="anchor"></a><h4 class="code-header">fn <a class="fnname">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><section id="impl-Copy-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-Copy-for-Uuid" class="anchor"></a><h3 class="code-header">impl Copy for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-Eq-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-Eq-for-Uuid" class="anchor"></a><h3 class="code-header">impl Eq for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-StructuralEq-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-StructuralEq-for-Uuid" class="anchor"></a><h3 class="code-header">impl StructuralEq for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-StructuralPartialEq-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/uuid/lib.rs.html#259">source</a><a href="#impl-StructuralPartialEq-for-Uuid" class="anchor"></a><h3 class="code-header">impl StructuralPartialEq for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Uuid" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Uuid" class="anchor"></a><h3 class="code-header">impl RefUnwindSafe for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-Send-for-Uuid" class="impl has-srclink"><a href="#impl-Send-for-Uuid" class="anchor"></a><h3 class="code-header">impl Send for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-Sync-for-Uuid" class="impl has-srclink"><a href="#impl-Sync-for-Uuid" class="anchor"></a><h3 class="code-header">impl Sync for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-Unpin-for-Uuid" class="impl has-srclink"><a href="#impl-Unpin-for-Uuid" class="anchor"></a><h3 class="code-header">impl Unpin for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section><section id="impl-UnwindSafe-for-Uuid" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Uuid" class="anchor"></a><h3 class="code-header">impl UnwindSafe for <a class="struct" href="struct.Uuid.html" title="struct uuid::Uuid">Uuid</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Uuid" class="impl has-srclink"><a href="#impl-Any-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> Any for T<span class="where fmt-newline">where<br> T: 'static + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a class="fnname">type_id</a>(&self) -> TypeId</h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Uuid" class="impl has-srclink"><a href="#impl-Borrow%3CT%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> Borrow<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow</a>(&self) -> &T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Uuid" class="impl has-srclink"><a href="#impl-BorrowMut%3CT%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> BorrowMut<T> for T<span class="where fmt-newline">where<br> T: ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a class="fnname">borrow_mut</a>(&mut self) -> &mut T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Uuid" class="impl has-srclink"><a href="#impl-From%3CT%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> From<T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.from-6" class="anchor"></a><h4 class="code-header">fn <a class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Uuid" class="impl has-srclink"><a href="#impl-Into%3CU%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T, U> Into<U> for T<span class="where fmt-newline">where<br> U: From<T>,</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="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">into</a>(self) -> 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>[From]<T> for U</code> chooses to do.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Uuid" class="impl has-srclink"><a href="#impl-ToOwned-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> ToOwned for T<span class="where fmt-newline">where<br> T: Clone,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a>Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">clone_into</a>(&self, target: &mut T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-Uuid" class="impl has-srclink"><a href="#impl-ToString-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> ToString for T<span class="where fmt-newline">where<br> T: Display + ?Sized,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a class="fnname">to_string</a>(&self) -> String</h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a>Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Uuid" class="impl has-srclink"><a href="#impl-TryFrom%3CU%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T, U> TryFrom<U> for T<span class="where fmt-newline">where<br> U: Into<T>,</span></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 class="associatedtype">Error</a> = Infallible</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"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Uuid" class="impl has-srclink"><a href="#impl-TryInto%3CU%3E-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T, U> TryInto<U> for T<span class="where fmt-newline">where<br> U: TryFrom<T>,</span></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 class="associatedtype">Error</a> = <U as TryFrom<T>>::Error</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_into" class="method trait-impl has-srclink"><span class="since rightside" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a class="fnname">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-DeserializeOwned-for-Uuid" class="impl has-srclink"><a class="srclink rightside" href="../src/serde/de/mod.rs.html#604">source</a><a href="#impl-DeserializeOwned-for-Uuid" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="../serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T<span class="where fmt-newline">where<br> T: for<'de> <a class="trait" href="../serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de>,</span></h3></section></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="uuid" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |