Enum figures::FloatOrInt
source · pub enum FloatOrInt {
Int(i32),
Float(f32),
}
Variants§
Implementations§
source§impl FloatOrInt
impl FloatOrInt
sourcepub fn into_points(self) -> Lp
pub fn into_points(self) -> Lp
Returns this number as Lp
using Lp::points
/Lp::points_f
.
sourcepub fn into_inches(self) -> Lp
pub fn into_inches(self) -> Lp
Returns this number as Lp
using Lp::inches
/Lp::inches_f
.
Trait Implementations§
source§impl Clone for FloatOrInt
impl Clone for FloatOrInt
source§fn clone(&self) -> FloatOrInt
fn clone(&self) -> FloatOrInt
Returns a copy of the value. Read more
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 From<f32> for FloatOrInt
impl From<f32> for FloatOrInt
source§impl From<i32> for FloatOrInt
impl From<i32> for FloatOrInt
impl Copy for FloatOrInt
Auto Trait Implementations§
impl RefUnwindSafe for FloatOrInt
impl Send for FloatOrInt
impl Sync for FloatOrInt
impl Unpin for FloatOrInt
impl UnwindSafe for FloatOrInt
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
§impl<A> Cast for A
impl<A> Cast for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere Unit: Copy,
source§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.