Enum serde_content::Number
source · #[non_exhaustive]pub enum Number {
I8(i8),
U8(u8),
I16(i16),
U16(u16),
I32(i32),
U32(u32),
F32(f32),
I64(i64),
U64(u64),
F64(f64),
I128(i128),
U128(u128),
}
Expand description
A containter for all Rust number types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
I8(i8)
Holds an 8-bit signed integer type.
U8(u8)
Holds an 8-bit unsigned integer type.
I16(i16)
Holds a 16-bit signed integer type.
U16(u16)
Holds a 16-bit unsigned integer type.
I32(i32)
Holds a 32-bit signed integer type.
U32(u32)
Holds a 32-bit unsigned integer type.
F32(f32)
Holds a 32-bit floating point type.
I64(i64)
Holds a 64-bit signed integer type.
U64(u64)
Holds a 64-bit unsigned integer type.
F64(f64)
Holds a 32-bit floating point type.
I128(i128)
Holds a 128-bit signed integer type.
U128(u128)
Holds a 128-bit unsigned integer type.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Number
impl<'de> Deserialize<'de> for Number
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
source§impl<'de> IntoDeserializer<'de, Error> for Number
impl<'de> IntoDeserializer<'de, Error> for Number
§type Deserializer = Deserializer<'de>
type Deserializer = Deserializer<'de>
The type of the deserializer being converted into.
source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
source§impl PartialOrd for Number
impl PartialOrd for Number
source§impl Unexpected for Number
impl Unexpected for Number
source§fn unexpected(self, expected: Expected) -> Error
fn unexpected(self, expected: Expected) -> Error
Consumes the type and returns an error.
impl Copy for Number
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)