pub fn parse_borrowed<const VERSION: usize>(
s: &str,
) -> Result<<Version<VERSION> as VersionedParser>::BorrowedOutput<'_>, InvalidFormatDescription>where
Version<VERSION>: VersionedParser,Available on (crate features
formatting or parsing) and crate feature alloc only.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. It is recommended to use version 3.
ยงReturn type
The return type of this function depends on the version provided.
- For versions 1 and 2, the function returns
Result<Vec<BorrowedFormatItem<'_>>, InvalidFormatDescription>. - For version 3, the function returns
Result<FormatDescriptionV3<'_>, InvalidFormatDescription>.