salvo::http::cookie::time::format_description

Function parse_owned

Source
pub fn parse_owned<const VERSION: usize>(
    s: &str,
) -> Result<OwnedFormatItem, InvalidFormatDescription>
Expand description

Parse a sequence of items from the format description.

The syntax for the format description can be found in the book. The version of the format description is provided as the const parameter.

Unlike parse, this function returns OwnedFormatItem, which owns its contents. This means that there is no lifetime that needs to be handled. It is recommended to use version 2.