Struct tikv_util::metrics::process_linux::PAGESIZE [−][src]
Fields
__private_field: ()
Methods from Deref<Target = f64>
pub const RADIX: u32
1.43.0[src]
pub const MANTISSA_DIGITS: u32
1.43.0[src]
pub const DIGITS: u32
1.43.0[src]
pub const EPSILON: f64
1.43.0[src]
pub const MIN: f64
1.43.0[src]
pub const MIN_POSITIVE: f64
1.43.0[src]
pub const MAX: f64
1.43.0[src]
pub const MIN_EXP: i32
1.43.0[src]
pub const MAX_EXP: i32
1.43.0[src]
pub const MIN_10_EXP: i32
1.43.0[src]
pub const MAX_10_EXP: i32
1.43.0[src]
pub const NAN: f64
1.43.0[src]
pub const INFINITY: f64
1.43.0[src]
pub const NEG_INFINITY: f64
1.43.0[src]
pub fn as_ne_bytes(&self) -> &[u8; 8]
[src]
num_as_ne_bytes
)Return the memory representation of this floating point number as a byte array in native byte order.
to_ne_bytes
should be preferred over this whenever possible.
Examples
#![feature(num_as_ne_bytes)] let num = 12.5f64; let bytes = num.as_ne_bytes(); assert_eq!( bytes, if cfg!(target_endian = "big") { &[0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] } else { &[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40] } );
pub fn total_cmp(&self, other: &f64) -> Ordering
[src]
total_cmp
)Returns an ordering between self and other values. Unlike the standard partial comparison between floating point numbers, this comparison always produces an ordering in accordance to the totalOrder predicate as defined in IEEE 754 (2008 revision) floating point standard. The values are ordered in following order:
- Negative quiet NaN
- Negative signaling NaN
- Negative infinity
- Negative numbers
- Negative subnormal numbers
- Negative zero
- Positive zero
- Positive subnormal numbers
- Positive numbers
- Positive infinity
- Positive signaling NaN
- Positive quiet NaN
Note that this function does not always agree with the PartialOrd
and PartialEq
implementations of f64
. In particular, they regard
negative and positive zero as equal, while total_cmp
doesn’t.
Example
#![feature(total_cmp)] struct GoodBoy { name: String, weight: f64, } let mut bois = vec![ GoodBoy { name: "Pucci".to_owned(), weight: 0.1 }, GoodBoy { name: "Woofer".to_owned(), weight: 99.0 }, GoodBoy { name: "Yapper".to_owned(), weight: 10.0 }, GoodBoy { name: "Chonk".to_owned(), weight: f64::INFINITY }, GoodBoy { name: "Abs. Unit".to_owned(), weight: f64::NAN }, GoodBoy { name: "Floaty".to_owned(), weight: -5.0 }, ]; bois.sort_by(|a, b| a.weight.total_cmp(&b.weight));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PAGESIZE
impl Send for PAGESIZE
impl Sync for PAGESIZE
impl Unpin for PAGESIZE
impl UnwindSafe for PAGESIZE
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,