# Function chrono::format::parse [−] [src]

    pub fn parse<'a, I>(parsed: &mut Parsed, s: &str, items: I) -> ParseResult<()> where
        I: Iterator<Item = Item<'a>>,

Tries to parse given string into `parsed` with given formatting items. Returns `Ok` when the entire string has been parsed (otherwise `parsed` should not be used). There should be no trailing string after parsing; use a stray `Item::Space` to trim whitespaces.

This particular date and time parser is:

- Greedy. It will consume the longest possible prefix. For example, `April` is always consumed entirely when the long month name is requested; it equally accepts `Apr`, but prefers the longer prefix in this case.

- Padding-agnostic (for numeric items). The `Pad` field is completely ignored, so one can prepend any number of whitespace then any number of zeroes before numbers.

- (Still) obeying the intrinsic parsing width. This allows, for example, parsing `HHMMSS`.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)