pub struct AxisFormat<'a>(/* private fields */);Expand description
A validated floating-point format that fits ImPlot’s axis storage.
Implementations§
Source§impl<'a> AxisFormat<'a>
impl<'a> AxisFormat<'a>
Sourcepub fn new(storage: impl Into<Cow<'a, str>>) -> Result<Self, AxisFormatError>
pub fn new(storage: impl Into<Cow<'a, str>>) -> Result<Self, AxisFormatError>
Validates a floating-point format and the axis storage limit.
Sourcepub fn borrowed(&self) -> AxisFormat<'_>
pub fn borrowed(&self) -> AxisFormat<'_>
Borrows this axis format without revalidating it.
Sourcepub fn into_owned(self) -> AxisFormat<'static>
pub fn into_owned(self) -> AxisFormat<'static>
Converts this format into an owned value.
Sourcepub fn into_float_format(self) -> FloatFormat<'a>
pub fn into_float_format(self) -> FloatFormat<'a>
Returns the underlying general-purpose floating-point format.
Trait Implementations§
Source§impl AsRef<str> for AxisFormat<'_>
impl AsRef<str> for AxisFormat<'_>
Source§impl<'a> Clone for AxisFormat<'a>
impl<'a> Clone for AxisFormat<'a>
Source§fn clone(&self) -> AxisFormat<'a>
fn clone(&self) -> AxisFormat<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AxisFormat<'a>
impl<'a> Debug for AxisFormat<'a>
Source§impl FromStr for AxisFormat<'static>
impl FromStr for AxisFormat<'static>
Source§impl<'a> PartialEq for AxisFormat<'a>
impl<'a> PartialEq for AxisFormat<'a>
impl<'a> StructuralPartialEq for AxisFormat<'a>
Source§impl<'a> TryFrom<&'a str> for AxisFormat<'a>
impl<'a> TryFrom<&'a str> for AxisFormat<'a>
Source§impl<'a> TryFrom<FloatFormat<'a>> for AxisFormat<'a>
impl<'a> TryFrom<FloatFormat<'a>> for AxisFormat<'a>
Source§type Error = AxisFormatError
type Error = AxisFormatError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<'a> Freeze for AxisFormat<'a>
impl<'a> RefUnwindSafe for AxisFormat<'a>
impl<'a> Send for AxisFormat<'a>
impl<'a> Sync for AxisFormat<'a>
impl<'a> Unpin for AxisFormat<'a>
impl<'a> UnsafeUnpin for AxisFormat<'a>
impl<'a> UnwindSafe for AxisFormat<'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