pub struct FormatDescriptionV3<'a> {
pub(crate) inner: FormatDescriptionV3Inner<'a>,
pub(crate) max_bytes_needed: usize,
}Available on crate features
formatting or parsing only.Expand description
A complete description of how to format and parse a type.
Both for forwards compatibility and to enable optimizations, this type is deliberately opaque
and cannot be constructed by users of the crate. Instead, it is returned by the
format_description! macro (when version=3 is used) as well as the parse_borrowed and
parse_owned methods.
Fields§
§inner: FormatDescriptionV3Inner<'a>The inner enum that controls all business logic.
max_bytes_needed: usizeAvailable on crate feature
formatting only.The maximum number of bytes that are needed to format any value using this format description.
Implementations§
Source§impl FormatDescriptionV3<'_>
impl FormatDescriptionV3<'_>
Sourcepub fn to_owned(self) -> FormatDescriptionV3<'static> ⓘ
Available on crate feature alloc only.
pub fn to_owned(self) -> FormatDescriptionV3<'static> ⓘ
alloc only.Convert the format description to an owned version, enabling it to be stored without regard for lifetime.
Trait Implementations§
Source§impl<'a> Clone for FormatDescriptionV3<'a>
impl<'a> Clone for FormatDescriptionV3<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComputeMetadata for FormatDescriptionV3<'_>
Available on crate feature formatting only.
impl ComputeMetadata for FormatDescriptionV3<'_>
Available on crate feature
formatting only.Source§fn compute_metadata(&self) -> Metadata
fn compute_metadata(&self) -> Metadata
Compute the metadata for a format description.
Source§impl Debug for FormatDescriptionV3<'_>
impl Debug for FormatDescriptionV3<'_>
Source§impl Sealed for FormatDescriptionV3<'_>
Available on crate feature formatting only.
impl Sealed for FormatDescriptionV3<'_>
Available on crate feature
formatting only.Source§impl Sealed for FormatDescriptionV3<'_>
Available on crate feature parsing only.
impl Sealed for FormatDescriptionV3<'_>
Available on crate feature
parsing only.Source§fn parse_date(&self, input: &[u8]) -> Result<Date, Parse>
fn parse_date(&self, input: &[u8]) -> Result<Date, Parse>
Parse a
Date from the format description.Source§fn parse_time(&self, input: &[u8]) -> Result<Time, Parse>
fn parse_time(&self, input: &[u8]) -> Result<Time, Parse>
Parse a
Time from the format description.Source§fn parse_offset(&self, input: &[u8]) -> Result<UtcOffset, Parse>
fn parse_offset(&self, input: &[u8]) -> Result<UtcOffset, Parse>
Parse a
UtcOffset from the format description.Source§fn parse_primitive_date_time(
&self,
input: &[u8],
) -> Result<PrimitiveDateTime, Parse>
fn parse_primitive_date_time( &self, input: &[u8], ) -> Result<PrimitiveDateTime, Parse>
Parse a
PrimitiveDateTime from the format description.Source§fn parse_utc_date_time(&self, input: &[u8]) -> Result<UtcDateTime, Parse>
fn parse_utc_date_time(&self, input: &[u8]) -> Result<UtcDateTime, Parse>
Parse a
UtcDateTime from the format description.Source§fn parse_offset_date_time(&self, input: &[u8]) -> Result<OffsetDateTime, Parse>
fn parse_offset_date_time(&self, input: &[u8]) -> Result<OffsetDateTime, Parse>
Parse a
OffsetDateTime from the format description.impl Formattable for FormatDescriptionV3<'_>
Available on crate feature
formatting only.impl Parsable for FormatDescriptionV3<'_>
Available on crate feature
parsing only.Auto Trait Implementations§
impl<'a> Freeze for FormatDescriptionV3<'a>
impl<'a> RefUnwindSafe for FormatDescriptionV3<'a>
impl<'a> Send for FormatDescriptionV3<'a>
impl<'a> Sync for FormatDescriptionV3<'a>
impl<'a> Unpin for FormatDescriptionV3<'a>
impl<'a> UnsafeUnpin for FormatDescriptionV3<'a>
impl<'a> UnwindSafe for FormatDescriptionV3<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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