pub struct Version<const N: usize>;Available on (crate features
formatting or parsing) and crate feature alloc only.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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more