pub enum NearestRoundingMode {
RoundPreferFloor,
RoundPreferCeil,
Floor,
Ceil,
}Expand description
Nearest rounding mode for nearest neighbor interpolation.
Variants§
RoundPreferFloor
Round with preference to floor at 0.5 boundaries (ceil(x - 0.5)).
RoundPreferCeil
Round with preference to ceil at 0.5 boundaries (floor(x + 0.5)).
Floor
Floor rounding (floor(x)).
Ceil
Ceil rounding (ceil(x)).
Trait Implementations§
Source§impl Clone for NearestRoundingMode
impl Clone for NearestRoundingMode
impl Copy for NearestRoundingMode
Source§impl Debug for NearestRoundingMode
impl Debug for NearestRoundingMode
Source§impl<'de> Deserialize<'de> for NearestRoundingMode
impl<'de> Deserialize<'de> for NearestRoundingMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NearestRoundingMode
Source§impl PartialEq for NearestRoundingMode
impl PartialEq for NearestRoundingMode
Source§impl Serialize for NearestRoundingMode
impl Serialize for NearestRoundingMode
impl StructuralPartialEq for NearestRoundingMode
Auto Trait Implementations§
impl Freeze for NearestRoundingMode
impl RefUnwindSafe for NearestRoundingMode
impl Send for NearestRoundingMode
impl Sync for NearestRoundingMode
impl Unpin for NearestRoundingMode
impl UnsafeUnpin for NearestRoundingMode
impl UnwindSafe for NearestRoundingMode
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.