pub enum SignEncoding {
Absent,
Magnitude,
TwosComplement,
}Expand description
How the sign of a stored number is encoded.
Variants§
Absent
No sign bit: the layout is unsigned and width() has no sign bit (uint).
Magnitude
A sign bit above the other fields selects the sign of the magnitude, so zero has two encodings (every IEEE-family float; sign-magnitude integers).
TwosComplement
A sign bit of weight -2^(mantissa_bits) over the mantissa field: the range is
asymmetric and zero has one encoding (int8 and the other native integers).
Trait Implementations§
Source§impl Clone for SignEncoding
impl Clone for SignEncoding
impl Copy for SignEncoding
Source§impl Debug for SignEncoding
impl Debug for SignEncoding
Source§impl<'de> Deserialize<'de> for SignEncoding
impl<'de> Deserialize<'de> for SignEncoding
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 SignEncoding
Source§impl Hash for SignEncoding
impl Hash for SignEncoding
Source§impl PartialEq for SignEncoding
impl PartialEq for SignEncoding
Source§impl Serialize for SignEncoding
impl Serialize for SignEncoding
impl StructuralPartialEq for SignEncoding
Auto Trait Implementations§
impl Freeze for SignEncoding
impl RefUnwindSafe for SignEncoding
impl Send for SignEncoding
impl Sync for SignEncoding
impl Unpin for SignEncoding
impl UnsafeUnpin for SignEncoding
impl UnwindSafe for SignEncoding
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
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§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.