pub(crate) struct Metadata {
pub(crate) max_bytes_needed: usize,
pub(crate) guaranteed_utf8: bool,
}Expand description
Metadata about a format description.
Fields§
§max_bytes_needed: usizeThe maximum number of bytes needed for the provided format description.
The number of bytes written should never exceed this value, but it may be less. This is used to pre-allocate a buffer of the appropriate size for formatting.
guaranteed_utf8: boolWhether the output of the provided format description is guaranteed to be valid UTF-8.
This is used to determine whether the output can be soundly converted to a String without
checking for UTF-8 validity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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