blob: 79986c147373a2873311962e86da0aa31998d95b [file] [log] [blame]
<!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="Additional documentation."><meta name="keywords" content="rust, rustlang, rust-lang, docs"><title>arc_swap::docs - 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="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc 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">&#9776;</button><a class="sidebar-logo" href="../../arc_swap/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../arc_swap/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module docs</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li></ul></section></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">Module <a href="../index.html">arc_swap</a>::<wbr><a class="mod" href="#">docs</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/arc_swap/docs/mod.rs.html#1-41">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional documentation.</p>
<p>Here we have some more general topics that might be good to know that just don’t fit to the
crate level intro.</p>
<p>Also, there were some previous blog posts about the crate which you might find interesting.</p>
<h2 id="atomic-orderings"><a href="#atomic-orderings">Atomic orderings</a></h2>
<p>Each operation on the <a href="../struct.ArcSwapAny.html"><code>ArcSwapAny</code></a> with <a href="../strategy/type.DefaultStrategy.html"><code>DefaultStrategy</code></a> type callable concurrently (eg.
<a href="../struct.ArcSwapAny.html#method.load"><code>load</code></a>, but not <a href="../struct.ArcSwapAny.html#method.into_inner"><code>into_inner</code></a>) contains at least one <a href="std::sync::atomic::Ordering::SeqCst"><code>SeqCst</code></a> atomic read-write operation,
therefore even operations on different instances have a defined global order of operations.</p>
<h2 id="features"><a href="#features">Features</a></h2>
<p>The <code>weak</code> feature adds the ability to use arc-swap with the <a href="std::sync::Weak"><code>Weak</code></a> pointer too,
through the <a href="crate::ArcSwapWeak"><code>ArcSwapWeak</code></a> type. The needed std support is stabilized in rust version 1.45 (as
of now in beta).</p>
<p>The <code>experimental-strategies</code> enables few more strategies that can be used. Note that these
<strong>are not</strong> part of the API stability guarantees and they may be changed, renamed or removed at
any time.</p>
<h2 id="minimal-compiler-version"><a href="#minimal-compiler-version">Minimal compiler version</a></h2>
<p>The <code>1</code> versions will compile on all compilers supporting the 2018 edition. Note that this
applies only if no additional feature flags are enabled and does not apply to compiling or
running tests.</p>
</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="internal/index.html" title="arc_swap::docs::internal mod">internal</a></div><div class="item-right docblock-short">Internal details.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="limitations/index.html" title="arc_swap::docs::limitations mod">limitations</a></div><div class="item-right docblock-short">Limitations and common pitfalls.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="patterns/index.html" title="arc_swap::docs::patterns mod">patterns</a></div><div class="item-right docblock-short">Common use patterns</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="performance/index.html" title="arc_swap::docs::performance mod">performance</a></div><div class="item-right docblock-short">Performance characteristics.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="arc_swap" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>