pub struct NonZeroF32(/* private fields */);Expand description
An f32 guaranteed not to be zero.
Option<Self> is niche-optimized to the size of the primitive.
Implementations§
Source§impl NonZeroF32
impl NonZeroF32
Sourcepub unsafe fn new_unchecked(value: f32) -> Self
pub unsafe fn new_unchecked(value: f32) -> Self
Trait Implementations§
Source§impl Clone for NonZeroF32
impl Clone for NonZeroF32
impl Copy for NonZeroF32
Source§impl Debug for NonZeroF32
impl Debug for NonZeroF32
Source§impl<'de> Deserialize<'de> for NonZeroF32
Available on crate feature serde only.
impl<'de> Deserialize<'de> for NonZeroF32
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NonZeroF32
impl Display for NonZeroF32
Source§impl From<NonZeroF32> for f32
impl From<NonZeroF32> for f32
Source§fn from(value: NonZeroF32) -> Self
fn from(value: NonZeroF32) -> Self
Converts to this type from the input type.
Source§impl FromStr for NonZeroF32
impl FromStr for NonZeroF32
Source§impl LowerExp for NonZeroF32
impl LowerExp for NonZeroF32
Source§impl PartialEq for NonZeroF32
impl PartialEq for NonZeroF32
Source§impl PartialOrd for NonZeroF32
impl PartialOrd for NonZeroF32
Source§impl Serialize for NonZeroF32
Available on crate feature serde only.
impl Serialize for NonZeroF32
Available on crate feature
serde only.Source§impl TryFrom<f32> for NonZeroF32
impl TryFrom<f32> for NonZeroF32
Auto Trait Implementations§
impl Forget for NonZeroF32
impl Freeze for NonZeroF32
impl Move for NonZeroF32
impl RefUnwindSafe for NonZeroF32
impl Send for NonZeroF32
impl Sync for NonZeroF32
impl Unpin for NonZeroF32
impl UnsafeUnpin for NonZeroF32where
NonZeroU32Inner: UnsafeUnpin,
impl UnwindSafe for NonZeroF32
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