#[non_exhaustive]pub enum ScalarType {
Show 22 variants
Unit,
Bool,
Str,
String,
CowStr,
F32,
F64,
U8,
U16,
U32,
U64,
USize,
I8,
I16,
I32,
I64,
ISize,
SocketAddr,
IpAddr,
Ipv4Addr,
Ipv6Addr,
ConstTypeId,
}Expand description
All scalar types supported out of the box by peek and poke.
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.
Unit
Unit tuple ().
Bool
Primitive type bool.
Str
Primitive type str.
String
std::string::String.
CowStr
std::borrow::Cow<'_, str>.
F32
Primitive type f32.
F64
Primitive type f64.
U8
Primitive type u8.
U16
Primitive type u16.
U32
Primitive type u32.
U64
Primitive type u64.
USize
Primitive type usize.
I8
Primitive type i8.
I16
Primitive type i16.
I32
Primitive type i32.
I64
Primitive type i64.
ISize
Primitive type isize.
SocketAddr
core::net::SocketAddr.
IpAddr
core::net::IpAddr.
Ipv4Addr
core::net::Ipv4Addr.
Ipv6Addr
core::net::Ipv6Addr.
ConstTypeId
facet_core::typeid::ConstTypeId.
Implementations§
Source§impl ScalarType
impl ScalarType
Sourcepub fn try_from_shape(shape: &'static Shape) -> Option<Self>
pub fn try_from_shape(shape: &'static Shape) -> Option<Self>
Infer the type from a shape definition.
Trait Implementations§
Source§impl Clone for ScalarType
impl Clone for ScalarType
Source§fn clone(&self) -> ScalarType
fn clone(&self) -> ScalarType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScalarType
impl Debug for ScalarType
Source§impl Hash for ScalarType
impl Hash for ScalarType
Source§impl Ord for ScalarType
impl Ord for ScalarType
Source§fn cmp(&self, other: &ScalarType) -> Ordering
fn cmp(&self, other: &ScalarType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ScalarType
impl PartialEq for ScalarType
Source§impl PartialOrd for ScalarType
impl PartialOrd for ScalarType
impl Copy for ScalarType
impl Eq for ScalarType
impl StructuralPartialEq for ScalarType
Auto Trait Implementations§
impl Freeze for ScalarType
impl RefUnwindSafe for ScalarType
impl Send for ScalarType
impl Sync for ScalarType
impl Unpin for ScalarType
impl UnwindSafe for ScalarType
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