393 lines
No EOL
58 KiB
HTML
393 lines
No EOL
58 KiB
HTML
<!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 - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../normalize.css">
|
||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
|
||
<script src="../../storage.js"></script>
|
||
|
||
|
||
|
||
|
||
</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">
|
||
<div class="sidebar-menu">☰</div>
|
||
|
||
<p class='location'>Struct Parsed</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.year">year</a><a href="#structfield.year_div_100">year_div_100</a><a href="#structfield.year_mod_100">year_mod_100</a><a href="#structfield.isoyear">isoyear</a><a href="#structfield.isoyear_div_100">isoyear_div_100</a><a href="#structfield.isoyear_mod_100">isoyear_mod_100</a><a href="#structfield.month">month</a><a href="#structfield.week_from_sun">week_from_sun</a><a href="#structfield.week_from_mon">week_from_mon</a><a href="#structfield.isoweek">isoweek</a><a href="#structfield.weekday">weekday</a><a href="#structfield.ordinal">ordinal</a><a href="#structfield.day">day</a><a href="#structfield.hour_div_12">hour_div_12</a><a href="#structfield.hour_mod_12">hour_mod_12</a><a href="#structfield.minute">minute</a><a href="#structfield.second">second</a><a href="#structfield.nanosecond">nanosecond</a><a href="#structfield.timestamp">timestamp</a><a href="#structfield.offset">offset</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.set_year">set_year</a><a href="#method.set_year_div_100">set_year_div_100</a><a href="#method.set_year_mod_100">set_year_mod_100</a><a href="#method.set_isoyear">set_isoyear</a><a href="#method.set_isoyear_div_100">set_isoyear_div_100</a><a href="#method.set_isoyear_mod_100">set_isoyear_mod_100</a><a href="#method.set_month">set_month</a><a href="#method.set_week_from_sun">set_week_from_sun</a><a href="#method.set_week_from_mon">set_week_from_mon</a><a href="#method.set_isoweek">set_isoweek</a><a href="#method.set_weekday">set_weekday</a><a href="#method.set_ordinal">set_ordinal</a><a href="#method.set_day">set_day</a><a href="#method.set_ampm">set_ampm</a><a href="#method.set_hour12">set_hour12</a><a href="#method.set_hour">set_hour</a><a href="#method.set_minute">set_minute</a><a href="#method.set_second">set_second</a><a href="#method.set_nanosecond">set_nanosecond</a><a href="#method.set_timestamp">set_timestamp</a><a href="#method.set_offset">set_offset</a><a href="#method.to_naive_date">to_naive_date</a><a href="#method.to_naive_time">to_naive_time</a><a href="#method.to_naive_datetime_with_offset">to_naive_datetime_with_offset</a><a href="#method.to_fixed_offset">to_fixed_offset</a><a href="#method.to_datetime">to_datetime</a><a href="#method.to_datetime_with_timezone">to_datetime_with_timezone</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-PartialEq">PartialEq</a><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div></div><p class='location'><a href='../index.html'>chrono</a>::<wbr><a href='index.html'>format</a></p><script>window.sidebarCurrent = {name: 'Parsed', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../../theme.js"></script>
|
||
<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 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'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../../src/chrono/format/parsed.rs.html#27-111' 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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
pub isoyear: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
pub month: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub isoweek: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub weekday: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>>,
|
||
pub ordinal: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub day: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub minute: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub second: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub nanosecond: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>,
|
||
pub timestamp: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>>,
|
||
pub offset: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>,
|
||
// some fields omitted
|
||
}</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 small-section-header'>
|
||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.year" class="structfield small-section-header">
|
||
<a href="#structfield.year" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></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 small-section-header">
|
||
<a href="#structfield.year_div_100" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Year divided by 100. Implies that the year is >= 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 >= 70</code> and 20 otherwise.</p>
|
||
</div><span id="structfield.year_mod_100" class="structfield small-section-header">
|
||
<a href="#structfield.year_mod_100" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Year modulo 100. Implies that the year is >= 1 BCE when set.</p>
|
||
</div><span id="structfield.isoyear" class="structfield small-section-header">
|
||
<a href="#structfield.isoyear" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Year in the <a href="../naive/struct.NaiveDate.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 small-section-header">
|
||
<a href="#structfield.isoyear_div_100" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Year in the <a href="../naive/struct.NaiveDate.html#week-date">ISO week date</a>, divided by 100.
|
||
Implies that the year is >= 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 >= 70</code> and 20 otherwise.</p>
|
||
</div><span id="structfield.isoyear_mod_100" class="structfield small-section-header">
|
||
<a href="#structfield.isoyear_mod_100" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Year in the <a href="../naive/struct.NaiveDate.html#week-date">ISO week date</a>, modulo 100.
|
||
Implies that the year is >= 1 BCE when set.</p>
|
||
</div><span id="structfield.month" class="structfield small-section-header">
|
||
<a href="#structfield.month" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code>
|
||
</span></span><div class='docblock'><p>Month (1--12).</p>
|
||
</div><span id="structfield.week_from_sun" class="structfield small-section-header">
|
||
<a href="#structfield.week_from_sun" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.week_from_mon" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.isoweek" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code>
|
||
</span></span><div class='docblock'><p><a href="../naive/struct.NaiveDate.html#week-date">ISO week number</a>
|
||
(1--52 or 1--53 depending on the year).</p>
|
||
</div><span id="structfield.weekday" class="structfield small-section-header">
|
||
<a href="#structfield.weekday" class="anchor field"></a>
|
||
<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><<a class="enum" href="../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>></code>
|
||
</span></span><div class='docblock'><p>Day of the week.</p>
|
||
</div><span id="structfield.ordinal" class="structfield small-section-header">
|
||
<a href="#structfield.ordinal" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.day" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.hour_div_12" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.hour_mod_12" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code>
|
||
</span></span><div class='docblock'><p>Hour number modulo 12 (0--11).</p>
|
||
</div><span id="structfield.minute" class="structfield small-section-header">
|
||
<a href="#structfield.minute" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code>
|
||
</span></span><div class='docblock'><p>Minute number (0--59).</p>
|
||
</div><span id="structfield.second" class="structfield small-section-header">
|
||
<a href="#structfield.second" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code>
|
||
</span></span><div class='docblock'><p>Second number (0--60, accounting for leap seconds).</p>
|
||
</div><span id="structfield.nanosecond" class="structfield small-section-header">
|
||
<a href="#structfield.nanosecond" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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 small-section-header">
|
||
<a href="#structfield.timestamp" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>></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 small-section-header">
|
||
<a href="#structfield.offset" class="anchor field"></a>
|
||
<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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code>
|
||
</span></span><div class='docblock'><p>Offset from the local time to UTC, in seconds.</p>
|
||
</div>
|
||
<h2 id='methods' class='small-section-header'>
|
||
Methods<a href='#methods' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#137-635' 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>pub fn <a href='#method.new' class='fnname'>new</a>() -> <a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#139-141' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_year' class='fnname'>set_year</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#144-146' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_year_div_100' class='fnname'>set_year_div_100</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#149-152' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_year_mod_100' class='fnname'>set_year_mod_100</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#155-158' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_isoyear' class='fnname'>set_isoyear</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#161-163' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_isoyear_div_100' class='fnname'>set_isoyear_div_100</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#166-169' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_isoyear_mod_100' class='fnname'>set_isoyear_mod_100</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#172-175' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_month' class='fnname'>set_month</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#178-180' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_week_from_sun' class='fnname'>set_week_from_sun</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#183-185' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_week_from_mon' class='fnname'>set_week_from_mon</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#188-190' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_isoweek' class='fnname'>set_isoweek</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#193-195' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_weekday' class='fnname'>set_weekday</a>(&mut self, value: <a class="enum" href="../../chrono/enum.Weekday.html" title="enum chrono::Weekday">Weekday</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#198-200' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_ordinal' class='fnname'>set_ordinal</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#203-205' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_day' class='fnname'>set_day</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#208-210' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_ampm' class='fnname'>set_ampm</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#214-216' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_hour12' class='fnname'>set_hour12</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#220-223' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_hour' class='fnname'>set_hour</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#227-232' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_minute' class='fnname'>set_minute</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#235-237' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_second' class='fnname'>set_second</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#240-242' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_nanosecond' class='fnname'>set_nanosecond</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#245-247' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_timestamp' class='fnname'>set_timestamp</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#250-252' title='goto source code'>[src]</a></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>pub fn <a href='#method.set_offset' class='fnname'>set_offset</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#255-257' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_naive_date' class='fnname'>to_naive_date</a>(&self) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/naive/struct.NaiveDate.html" title="struct chrono::naive::NaiveDate">NaiveDate</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#270-444' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_naive_time' class='fnname'>to_naive_time</a>(&self) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/naive/struct.NaiveTime.html" title="struct chrono::naive::NaiveTime">NaiveTime</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#455-488' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_naive_datetime_with_offset' class='fnname'>to_naive_datetime_with_offset</a>(<br> &self, <br> offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/naive/struct.NaiveDateTime.html" title="struct chrono::naive::NaiveDateTime">NaiveDateTime</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#497-564' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_fixed_offset' class='fnname'>to_fixed_offset</a>(&self) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#567-569' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_datetime' class='fnname'>to_datetime</a>(&self) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><<a class="struct" href="../../chrono/offset/struct.FixedOffset.html" title="struct chrono::offset::FixedOffset">FixedOffset</a>>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#577-586' title='goto source code'>[src]</a></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>pub fn <a href='#method.to_datetime_with_timezone' class='fnname'>to_datetime_with_timezone</a><Tz: <a class="trait" href="../../chrono/offset/trait.TimeZone.html" title="trait chrono::offset::TimeZone">TimeZone</a>>(<br> &self, <br> tz: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Tz<br>) -> <a class="type" href="../../chrono/format/type.ParseResult.html" title="type chrono::format::ParseResult">ParseResult</a><<a class="struct" href="../../chrono/struct.DateTime.html" title="struct chrono::DateTime">DateTime</a><Tz>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#597-634' title='goto source code'>[src]</a></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' class='small-section-header'>
|
||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl-Clone' 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/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' 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>(&self) -> <a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' title='goto source code'>[src]</a></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>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></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 id='impl-PartialEq' 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/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code><a href='#impl-PartialEq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' 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>(&self, __arg_0: &<a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' title='goto source code'>[src]</a></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>(&self, __arg_0: &<a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Debug' 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/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' 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>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#26' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::Parsed">Parsed</a></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/chrono/format/parsed.rs.html#124-135' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="struct" href="../../chrono/format/struct.Parsed.html" title="struct chrono::format::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-134' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></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><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse 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> |