pub struct Version<const N: usize>;Expand description
The version of the parser, represented in the type system.
Trait Implementations§
Source§impl VersionedParser for Version<1>
impl VersionedParser for Version<1>
Source§type BorrowedOutput<'input> = Vec<BorrowedFormatItem<'input>>
type BorrowedOutput<'input> = Vec<BorrowedFormatItem<'input>>
The output type of the borrowed parser. This type avoids allocating where possible.
Source§type OwnedOutput = OwnedFormatItem
type OwnedOutput = OwnedFormatItem
The output type of the owned parser. This type may allocate but is valid for
'static.Source§fn parse_borrowed(
s: &str,
) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
fn parse_borrowed( s: &str, ) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
Parse a format description into a type that avoids allocating where possible.
Source§fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
Parse a format description into an owned type, which may allocate but is valid for
'static.Source§impl VersionedParser for Version<2>
impl VersionedParser for Version<2>
Source§type BorrowedOutput<'input> = Vec<BorrowedFormatItem<'input>>
type BorrowedOutput<'input> = Vec<BorrowedFormatItem<'input>>
The output type of the borrowed parser. This type avoids allocating where possible.
Source§type OwnedOutput = OwnedFormatItem
type OwnedOutput = OwnedFormatItem
The output type of the owned parser. This type may allocate but is valid for
'static.Source§fn parse_borrowed(
s: &str,
) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
fn parse_borrowed( s: &str, ) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
Parse a format description into a type that avoids allocating where possible.
Source§fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
Parse a format description into an owned type, which may allocate but is valid for
'static.Source§impl VersionedParser for Version<3>
impl VersionedParser for Version<3>
Source§type BorrowedOutput<'input> = FormatDescriptionV3<'input>
type BorrowedOutput<'input> = FormatDescriptionV3<'input>
The output type of the borrowed parser. This type avoids allocating where possible.
Source§type OwnedOutput = FormatDescriptionV3<'static>
type OwnedOutput = FormatDescriptionV3<'static>
The output type of the owned parser. This type may allocate but is valid for
'static.Source§fn parse_borrowed(
s: &str,
) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
fn parse_borrowed( s: &str, ) -> Result<Self::BorrowedOutput<'_>, InvalidFormatDescription>
Parse a format description into a type that avoids allocating where possible.
Source§fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
fn parse_owned(s: &str) -> Result<Self::OwnedOutput, InvalidFormatDescription>
Parse a format description into an owned type, which may allocate but is valid for
'static.Auto Trait Implementations§
impl<const N: usize> Freeze for Version<N>
impl<const N: usize> RefUnwindSafe for Version<N>
impl<const N: usize> Send for Version<N>
impl<const N: usize> Sync for Version<N>
impl<const N: usize> Unpin for Version<N>
impl<const N: usize> UnsafeUnpin for Version<N>
impl<const N: usize> UnwindSafe for Version<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more