blob: 97215d018020d7ec00db175135075db400edc712 [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="A type that describes a format."><meta name="keywords" content="rust, rustlang, rust-lang, Formattable"><title>Formattable in time::formatting - 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://avatars0.githubusercontent.com/u/55999857"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../time/index.html"><div class="logo-container"><img src="https://avatars0.githubusercontent.com/u/55999857" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../time/index.html"><div class="logo-container">
<img src="https://avatars0.githubusercontent.com/u/55999857" alt="logo"></div></a><h2 class="location"><a href="#">Formattable</a></h2><div class="sidebar-elems"><section><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Formattable-for-%5BFormatItem%3C%27_%3E%5D">[FormatItem&lt;&#39;_&gt;]</a></li><li><a href="#impl-Formattable-for-%5BOwnedFormatItem%5D">[OwnedFormatItem]</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In time::formatting</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">Trait <a href="../index.html">time</a>::<wbr><a href="index.html">formatting</a>::<wbr><a class="trait" href="#">Formattable</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/time/formatting/formattable.rs.html#21">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Formattable: Sealed { }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A type that describes a format.</p>
<p>Implementors of <a href="trait.Formattable.html" title="Formattable"><code>Formattable</code></a> are <a href="../format_description/index.html">format descriptions</a>.</p>
<p><a href="../struct.Date.html#method.format" title="Date::format"><code>Date::format</code></a> and <a href="../struct.Time.html#method.format" title="Time::format"><code>Time::format</code></a> each use a format description to generate
a String from their data. See the respective methods for usage examples.</p>
</div></details><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><section id="impl-Formattable-for-%5BFormatItem%3C%27_%3E%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#23">source</a><a href="#impl-Formattable-for-%5BFormatItem%3C%27_%3E%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for [<a class="enum" href="../format_description/enum.FormatItem.html" title="enum time::format_description::FormatItem">FormatItem</a>&lt;'_&gt;]</h3></section><section id="impl-Formattable-for-%5BOwnedFormatItem%5D" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#25">source</a><a href="#impl-Formattable-for-%5BOwnedFormatItem%5D" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for [<a class="enum" href="../format_description/enum.OwnedFormatItem.html" title="enum time::format_description::OwnedFormatItem">OwnedFormatItem</a>]</h3></section><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Formattable-for-FormatItem%3C%27_%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#22">source</a><a href="#impl-Formattable-for-FormatItem%3C%27_%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for <a class="enum" href="../format_description/enum.FormatItem.html" title="enum time::format_description::FormatItem">FormatItem</a>&lt;'_&gt;</h3></section><section id="impl-Formattable-for-OwnedFormatItem" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#24">source</a><a href="#impl-Formattable-for-OwnedFormatItem" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for <a class="enum" href="../format_description/enum.OwnedFormatItem.html" title="enum time::format_description::OwnedFormatItem">OwnedFormatItem</a></h3></section><section id="impl-Formattable-for-Rfc2822" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#27">source</a><a href="#impl-Formattable-for-Rfc2822" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for <a class="struct" href="../format_description/well_known/struct.Rfc2822.html" title="struct time::format_description::well_known::Rfc2822">Rfc2822</a></h3></section><section id="impl-Formattable-for-Rfc3339" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#26">source</a><a href="#impl-Formattable-for-Rfc3339" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for <a class="struct" href="../format_description/well_known/struct.Rfc3339.html" title="struct time::format_description::well_known::Rfc3339">Rfc3339</a></h3></section><section id="impl-Formattable-for-T" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#29">source</a><a href="#impl-Formattable-for-T" class="anchor"></a><h3 class="code-header">impl&lt;T:&nbsp;Deref&gt; <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T::Target: <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a>,</span></h3></section><section id="impl-Formattable-for-Iso8601%3CCONFIG%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/time/formatting/formattable.rs.html#28">source</a><a href="#impl-Formattable-for-Iso8601%3CCONFIG%3E" class="anchor"></a><h3 class="code-header">impl&lt;const CONFIG:&nbsp;<a class="type" href="../format_description/well_known/iso8601/type.EncodedConfig.html" title="type time::format_description::well_known::iso8601::EncodedConfig">EncodedConfig</a>&gt; <a class="trait" href="trait.Formattable.html" title="trait time::formatting::Formattable">Formattable</a> for <a class="struct" href="../format_description/well_known/struct.Iso8601.html" title="struct time::format_description::well_known::Iso8601">Iso8601</a>&lt;CONFIG&gt;</h3></section></div><script src="../../implementors/time/formatting/formattable/trait.Formattable.js" data-ignore-extern-crates="core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="time" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>