#[repr(u32)]pub enum Typ {
Show 19 variants
U32 = 1,
V32 = 2,
I32 = 4,
Z32 = 8,
U64 = 16,
V64 = 32,
I64 = 64,
Z64 = 128,
F32 = 256,
F64 = 512,
Decimal = 1_024,
DateTime = 2_048,
Duration = 4_096,
Bool = 8_192,
Null = 16_384,
String = 2_147_483_648,
Bytes = 1_073_741_824,
Error = 536_870_912,
Array = 268_435_456,
}
Variants§
U32 = 1
V32 = 2
I32 = 4
Z32 = 8
U64 = 16
V64 = 32
I64 = 64
Z64 = 128
F32 = 256
F64 = 512
Decimal = 1_024
DateTime = 2_048
Duration = 4_096
Bool = 8_192
Null = 16_384
String = 2_147_483_648
Bytes = 1_073_741_824
Error = 536_870_912
Array = 268_435_456
Implementations§
Source§impl Typ
impl Typ
pub fn parse(&self, s: &str) -> Result<Value>
pub fn name(&self) -> &'static str
pub fn get(v: &Value) -> Self
pub fn any() -> BitFlags<Typ>
pub fn number() -> BitFlags<Typ>
pub fn is_number(&self) -> bool
pub fn integer() -> BitFlags<Typ>
pub fn is_integer(&self) -> bool
pub fn signed_integer() -> BitFlags<Typ>
pub fn is_signed_integer(&self) -> bool
pub fn unsigned_integer() -> BitFlags<Typ>
pub fn is_unsigned_integer(&self) -> bool
pub fn float() -> BitFlags<Typ>
pub fn real() -> BitFlags<Typ>
pub fn is_real(&self) -> bool
Trait Implementations§
Source§impl BitFlag for Typ
impl BitFlag for Typ
Source§fn empty() -> BitFlags<Self>
fn empty() -> BitFlags<Self>
Create a
BitFlags
with no flags set (in other words, with a value of 0). Read moreSource§fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
Create a
BitFlags
if the raw value provided does not contain
any illegal flags. Read moreSource§fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags
from an underlying bitwise value. If any
invalid bits are set, ignore them. Read moreSource§unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags
unsafely, without checking if the bits form
a valid bit pattern for the type. Read moreSource§impl<'de> Deserialize<'de> for Typ
impl<'de> Deserialize<'de> for Typ
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 Ord for Typ
impl Ord for Typ
Source§impl PartialOrd for Typ
impl PartialOrd for Typ
Source§impl RawBitFlags for Typ
impl RawBitFlags for Typ
Source§const EMPTY: Self::Numeric = {transmute(0x00000000): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
const EMPTY: Self::Numeric = {transmute(0x00000000): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
A value with no bits set.
Source§const DEFAULT: Self::Numeric = {transmute(0x00000000): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
const DEFAULT: Self::Numeric = {transmute(0x00000000): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
The value used by the Default implementation. Equivalent to EMPTY, unless
customized.
Source§const ALL_BITS: Self::Numeric = {transmute(0xf0007fff): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
const ALL_BITS: Self::Numeric = {transmute(0xf0007fff): <value::Typ as enumflags2::_internal::RawBitFlags>::Numeric}
A value with all flag bits set.
Source§const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<Typ>"
const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<Typ>"
The name of the type for debug formatting purposes. Read more
impl Copy for Typ
impl Eq for Typ
impl StructuralPartialEq for Typ
Auto Trait Implementations§
impl Freeze for Typ
impl RefUnwindSafe for Typ
impl Send for Typ
impl Sync for Typ
impl Unpin for Typ
impl UnwindSafe for Typ
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more