pnmixer-rust/chrono/format/parsed/struct.Parsed.html
2017-07-15 01:30:16 +02:00

356 lines
46 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="API documentation for the Rust `Parsed` struct in crate `chrono`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Parsed">
<title>chrono::format::parsed::Parsed - Rust</title>
<link rel="stylesheet" type="text/css" href="../../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../../main.css">
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Struct Parsed</p><div class="block items"><ul><li><a href="#fields">Fields</a></li><li><a href="#methods">Methods</a></li><li><a href="#implementations">Trait Implementations</a></li></ul></div><p class='location'><a href='../../index.html'>chrono</a>::<wbr><a href='../index.html'>format</a>::<wbr><a href='index.html'>parsed</a></p><script>window.sidebarCurrent = {name: 'Parsed', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>chrono</a>::<wbr><a href='../index.html'>format</a>::<wbr><a href='index.html'>parsed</a>::<wbr><a class="struct" href=''>Parsed</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../../src/chrono/format/parsed.rs.html#31-112' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Parsed {
pub year: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub year_div_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub year_mod_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub isoyear: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub isoyear_div_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub isoyear_mod_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
pub month: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub week_from_sun: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub week_from_mon: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub isoweek: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub weekday: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>&gt;,
pub ordinal: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub day: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub hour_div_12: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub hour_mod_12: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub minute: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub second: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub nanosecond: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
pub timestamp: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>&gt;,
pub offset: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;,
}</pre><div class='docblock'><p>Parsed parts of date and time. There are two classes of methods:</p>
<ul>
<li><p><code>set_*</code> methods try to set given field(s) while checking for the consistency.
It may or may not check for the range constraint immediately (for efficiency reasons).</p></li>
<li><p><code>to_*</code> methods try to make a concrete date and time value out of set fields.
It fully checks any remaining out-of-range conditions and inconsistent/impossible fields.</p></li>
</ul>
</div><h2 id='fields' class='fields'>Fields</h2><span id='structfield.year' class="structfield">
<span id='year.v' class='invisible'>
<code>year: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year.</p>
<p>This can be negative unlike <a href="#structfield.year_div_100"><code>year_div_100</code></a>
and <a href="#structfield.year_mod_100"><code>year_mod_100</code></a> fields.</p>
</div><span id='structfield.year_div_100' class="structfield">
<span id='year_div_100.v' class='invisible'>
<code>year_div_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year divided by 100. Implies that the year is &gt;= 1 BCE when set.</p>
<p>Due to the common usage, if this field is missing but
<a href="#structfield.year_mod_100"><code>year_mod_100</code></a> is present,
it is inferred to 19 when <code>year_mod_100 &gt;= 70</code> and 20 otherwise.</p>
</div><span id='structfield.year_mod_100' class="structfield">
<span id='year_mod_100.v' class='invisible'>
<code>year_mod_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year modulo 100. Implies that the year is &gt;= 1 BCE when set.</p>
</div><span id='structfield.isoyear' class="structfield">
<span id='isoyear.v' class='invisible'>
<code>isoyear: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year in the <a href="../../naive/date/index.html#week-date">ISO week date</a>.</p>
<p>This can be negative unlike <a href="#structfield.isoyear_div_100"><code>isoyear_div_100</code></a> and
<a href="#structfield.isoyear_mod_100"><code>isoyear_mod_100</code></a> fields.</p>
</div><span id='structfield.isoyear_div_100' class="structfield">
<span id='isoyear_div_100.v' class='invisible'>
<code>isoyear_div_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year in the <a href="../../naive/date/index.html#week-date">ISO week date</a>, divided by 100.
Implies that the year is &gt;= 1 BCE when set.</p>
<p>Due to the common usage, if this field is missing but
<a href="#structfield.isoyear_mod_100"><code>isoyear_mod_100</code></a> is present,
it is inferred to 19 when <code>isoyear_mod_100 &gt;= 70</code> and 20 otherwise.</p>
</div><span id='structfield.isoyear_mod_100' class="structfield">
<span id='isoyear_mod_100.v' class='invisible'>
<code>isoyear_mod_100: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Year in the <a href="../../naive/date/index.html#week-date">ISO week date</a>, modulo 100.
Implies that the year is &gt;= 1 BCE when set.</p>
</div><span id='structfield.month' class="structfield">
<span id='month.v' class='invisible'>
<code>month: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Month (1--12).</p>
</div><span id='structfield.week_from_sun' class="structfield">
<span id='week_from_sun.v' class='invisible'>
<code>week_from_sun: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Week number, where the week 1 starts at the first Sunday of January
(0--53, 1--53 or 1--52 depending on the year).</p>
</div><span id='structfield.week_from_mon' class="structfield">
<span id='week_from_mon.v' class='invisible'>
<code>week_from_mon: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Week number, where the week 1 starts at the first Monday of January
(0--53, 1--53 or 1--52 depending on the year).</p>
</div><span id='structfield.isoweek' class="structfield">
<span id='isoweek.v' class='invisible'>
<code>isoweek: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p><a href="../../naive/date/index.html#week-date">ISO week number</a>
(1--52 or 1--53 depending on the year).</p>
</div><span id='structfield.weekday' class="structfield">
<span id='weekday.v' class='invisible'>
<code>weekday: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>&gt;</code>
</span></span><div class='docblock'><p>Day of the week.</p>
</div><span id='structfield.ordinal' class="structfield">
<span id='ordinal.v' class='invisible'>
<code>ordinal: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Day of the year (1--365 or 1--366 depending on the year).</p>
</div><span id='structfield.day' class="structfield">
<span id='day.v' class='invisible'>
<code>day: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Day of the month (1--28, 1--29, 1--30 or 1--31 depending on the month).</p>
</div><span id='structfield.hour_div_12' class="structfield">
<span id='hour_div_12.v' class='invisible'>
<code>hour_div_12: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Hour number divided by 12 (0--1). 0 indicates AM and 1 indicates PM.</p>
</div><span id='structfield.hour_mod_12' class="structfield">
<span id='hour_mod_12.v' class='invisible'>
<code>hour_mod_12: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Hour number modulo 12 (0--11).</p>
</div><span id='structfield.minute' class="structfield">
<span id='minute.v' class='invisible'>
<code>minute: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Minute number (0--59).</p>
</div><span id='structfield.second' class="structfield">
<span id='second.v' class='invisible'>
<code>second: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>Second number (0--60, accounting for leap seconds).</p>
</div><span id='structfield.nanosecond' class="structfield">
<span id='nanosecond.v' class='invisible'>
<code>nanosecond: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</code>
</span></span><div class='docblock'><p>The number of nanoseconds since the whole second (0--999,999,999).</p>
</div><span id='structfield.timestamp' class="structfield">
<span id='timestamp.v' class='invisible'>
<code>timestamp: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>&gt;</code>
</span></span><div class='docblock'><p>The number of non-leap seconds since the midnight UTC on January 1, 1970.</p>
<p>This can be off by one if <a href="#structfield.second"><code>second</code></a> is 60 (a leap second).</p>
</div><span id='structfield.offset' class="structfield">
<span id='offset.v' class='invisible'>
<code>offset: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</code>
</span></span><div class='docblock'><p>Offset from the local time to UTC, in seconds.</p>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/chrono/format/parsed.rs.html#125-632' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span></h4>
<div class='docblock'><p>Returns the initial value of parsed parts.</p>
</div><h4 id='method.set_year' class="method"><span id='set_year.v' class='invisible'><code>fn <a href='#method.set_year' class='fnname'>set_year</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.year"><code>year</code></a> field from given value.</p>
</div><h4 id='method.set_year_div_100' class="method"><span id='set_year_div_100.v' class='invisible'><code>fn <a href='#method.set_year_div_100' class='fnname'>set_year_div_100</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.year_div_100"><code>year_div_100</code></a> field from given value.</p>
</div><h4 id='method.set_year_mod_100' class="method"><span id='set_year_mod_100.v' class='invisible'><code>fn <a href='#method.set_year_mod_100' class='fnname'>set_year_mod_100</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.year_mod_100"><code>year_mod_100</code></a> field from given value.</p>
</div><h4 id='method.set_isoyear' class="method"><span id='set_isoyear.v' class='invisible'><code>fn <a href='#method.set_isoyear' class='fnname'>set_isoyear</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.isoyear"><code>isoyear</code></a> field from given value.</p>
</div><h4 id='method.set_isoyear_div_100' class="method"><span id='set_isoyear_div_100.v' class='invisible'><code>fn <a href='#method.set_isoyear_div_100' class='fnname'>set_isoyear_div_100</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.isoyear_div_100"><code>isoyear_div_100</code></a> field from given value.</p>
</div><h4 id='method.set_isoyear_mod_100' class="method"><span id='set_isoyear_mod_100.v' class='invisible'><code>fn <a href='#method.set_isoyear_mod_100' class='fnname'>set_isoyear_mod_100</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.isoyear_mod_100"><code>isoyear_mod_100</code></a> field from given value.</p>
</div><h4 id='method.set_month' class="method"><span id='set_month.v' class='invisible'><code>fn <a href='#method.set_month' class='fnname'>set_month</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.month"><code>month</code></a> field from given value.</p>
</div><h4 id='method.set_week_from_sun' class="method"><span id='set_week_from_sun.v' class='invisible'><code>fn <a href='#method.set_week_from_sun' class='fnname'>set_week_from_sun</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.week_from_sun"><code>week_from_sun</code></a> field from given value.</p>
</div><h4 id='method.set_week_from_mon' class="method"><span id='set_week_from_mon.v' class='invisible'><code>fn <a href='#method.set_week_from_mon' class='fnname'>set_week_from_mon</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.week_from_mon"><code>week_from_mon</code></a> field from given value.</p>
</div><h4 id='method.set_isoweek' class="method"><span id='set_isoweek.v' class='invisible'><code>fn <a href='#method.set_isoweek' class='fnname'>set_isoweek</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.isoweek"><code>isoweek</code></a> field from given value.</p>
</div><h4 id='method.set_weekday' class="method"><span id='set_weekday.v' class='invisible'><code>fn <a href='#method.set_weekday' class='fnname'>set_weekday</a>(&amp;mut self, value: <a class="enum" href="../../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.weekday"><code>weekday</code></a> field from given value.</p>
</div><h4 id='method.set_ordinal' class="method"><span id='set_ordinal.v' class='invisible'><code>fn <a href='#method.set_ordinal' class='fnname'>set_ordinal</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.ordinal"><code>ordinal</code></a> field from given value.</p>
</div><h4 id='method.set_day' class="method"><span id='set_day.v' class='invisible'><code>fn <a href='#method.set_day' class='fnname'>set_day</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.day"><code>day</code></a> field from given value.</p>
</div><h4 id='method.set_ampm' class="method"><span id='set_ampm.v' class='invisible'><code>fn <a href='#method.set_ampm' class='fnname'>set_ampm</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.hour_div_12"><code>hour_div_12</code></a> field from given value.
(<code>false</code> for AM, <code>true</code> for PM)</p>
</div><h4 id='method.set_hour12' class="method"><span id='set_hour12.v' class='invisible'><code>fn <a href='#method.set_hour12' class='fnname'>set_hour12</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.hour_mod_12"><code>hour_mod_12</code></a> field from
given hour number in 12-hour clocks.</p>
</div><h4 id='method.set_hour' class="method"><span id='set_hour.v' class='invisible'><code>fn <a href='#method.set_hour' class='fnname'>set_hour</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set both <a href="#structfield.hour_div_12"><code>hour_div_12</code></a> and
<a href="#structfield.hour_mod_12"><code>hour_mod_12</code></a> fields from given value.</p>
</div><h4 id='method.set_minute' class="method"><span id='set_minute.v' class='invisible'><code>fn <a href='#method.set_minute' class='fnname'>set_minute</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.minute"><code>minute</code></a> field from given value.</p>
</div><h4 id='method.set_second' class="method"><span id='set_second.v' class='invisible'><code>fn <a href='#method.set_second' class='fnname'>set_second</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.second"><code>second</code></a> field from given value.</p>
</div><h4 id='method.set_nanosecond' class="method"><span id='set_nanosecond.v' class='invisible'><code>fn <a href='#method.set_nanosecond' class='fnname'>set_nanosecond</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.nanosecond"><code>nanosecond</code></a> field from given value.</p>
</div><h4 id='method.set_timestamp' class="method"><span id='set_timestamp.v' class='invisible'><code>fn <a href='#method.set_timestamp' class='fnname'>set_timestamp</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.timestamp"><code>timestamp</code></a> field from given value.</p>
</div><h4 id='method.set_offset' class="method"><span id='set_offset.v' class='invisible'><code>fn <a href='#method.set_offset' class='fnname'>set_offset</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a>&gt;</code></span></h4>
<div class='docblock'><p>Tries to set the <a href="#structfield.offset"><code>offset</code></a> field from given value.</p>
</div><h4 id='method.to_naive_date' class="method"><span id='to_naive_date.v' class='invisible'><code>fn <a href='#method.to_naive_date' class='fnname'>to_naive_date</a>(&amp;self) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/naive/date/struct.NaiveDate.html" title="struct chrono::naive::date::NaiveDate">NaiveDate</a>&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed naive date out of given fields.</p>
<p>This method is able to determine the date from given subset of fields:</p>
<ul>
<li>Year, month, day.</li>
<li>Year, day of the year (ordinal).</li>
<li>Year, week number counted from Sunday or Monday, day of the week.</li>
<li>ISO week date.</li>
</ul>
<p>Gregorian year and ISO week date year can have their century number (<code>*_div_100</code>) omitted,
the two-digit year is used to guess the century number then.</p>
</div><h4 id='method.to_naive_time' class="method"><span id='to_naive_time.v' class='invisible'><code>fn <a href='#method.to_naive_time' class='fnname'>to_naive_time</a>(&amp;self) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/naive/time/struct.NaiveTime.html" title="struct chrono::naive::time::NaiveTime">NaiveTime</a>&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed naive time out of given fields.</p>
<p>This method is able to determine the time from given subset of fields:</p>
<ul>
<li>Hour, minute. (second and nanosecond assumed to be 0)</li>
<li>Hour, minute, second. (nanosecond assumed to be 0)</li>
<li>Hour, minute, second, nanosecond.</li>
</ul>
<p>It is able to handle leap seconds when given second is 60.</p>
</div><h4 id='method.to_naive_datetime_with_offset' class="method"><span id='to_naive_datetime_with_offset.v' class='invisible'><code>fn <a href='#method.to_naive_datetime_with_offset' class='fnname'>to_naive_datetime_with_offset</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/naive/datetime/struct.NaiveDateTime.html" title="struct chrono::naive::datetime::NaiveDateTime">NaiveDateTime</a>&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed naive date and time out of given fields,
except for the <a href="#structfield.offset"><code>offset</code></a> field (assumed to have a given value).
This is required for parsing a local time or other known-timezone inputs.</p>
<p>This method is able to determine the combined date and time
from date and time fields or a single <a href="#structfield.timestamp"><code>timestamp</code></a> field.
Either way those fields have to be consistent to each other.</p>
</div><h4 id='method.to_fixed_offset' class="method"><span id='to_fixed_offset.v' class='invisible'><code>fn <a href='#method.to_fixed_offset' class='fnname'>to_fixed_offset</a>(&amp;self) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/offset/fixed/struct.FixedOffset.html" title="struct chrono::offset::fixed::FixedOffset">FixedOffset</a>&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed fixed time zone offset out of given fields.</p>
</div><h4 id='method.to_datetime' class="method"><span id='to_datetime.v' class='invisible'><code>fn <a href='#method.to_datetime' class='fnname'>to_datetime</a>(&amp;self) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a>&lt;<a class="struct" href="../../../chrono/offset/fixed/struct.FixedOffset.html" title="struct chrono::offset::fixed::FixedOffset">FixedOffset</a>&gt;&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed timezone-aware date and time out of given fields.</p>
<p>This method is able to determine the combined date and time
from date and time fields or a single <a href="#structfield.timestamp"><code>timestamp</code></a> field,
plus a time zone offset.
Either way those fields have to be consistent to each other.</p>
</div><h4 id='method.to_datetime_with_timezone' class="method"><span id='to_datetime_with_timezone.v' class='invisible'><code>fn <a href='#method.to_datetime_with_timezone' class='fnname'>to_datetime_with_timezone</a>&lt;Tz:&nbsp;<a class="trait" href="../../../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;tz: &amp;Tz<br>) -&gt; <a class="type" href="../../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a>&lt;<a class="struct" href="../../../chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a>&lt;Tz&gt;&gt;</code></span></h4>
<div class='docblock'><p>Returns a parsed timezone-aware date and time out of given fields,
with an additional <code>TimeZone</code> used to interpret and validate the local date.</p>
<p>This method is able to determine the combined date and time
from date and time fields or a single <a href="#structfield.timestamp"><code>timestamp</code></a> field,
plus a time zone offset.
Either way those fields have to be consistent to each other.
If parsed fields include an UTC offset, it also has to be consistent to
<a href="#structfield.offset"><code>offset</code></a>.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/chrono/format/parsed.rs.html#30' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/chrono/format/parsed.rs.html#30' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../../chrono/format/parsed/struct.Parsed.html" title="struct chrono::format::parsed::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/chrono/format/parsed.rs.html#30' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../../";
window.currentCrate = "chrono";
</script>
<script src="../../../main.js"></script>
<script defer src="../../../search-index.js"></script>
</body>
</html>