pub enum ConversionTypeKind {
Boolean,
Measure,
Number,
Ratio,
Date,
Time,
}Expand description
Primitive kind that can appear as an as conversion target. Excludes Text
(display formatting is not a conversion) and the range kinds (a range is not
a cast target — use a range literal or ... operator instead). The parser
rejects as text at the as target position; data x: text declarations
still use [PrimitiveKind::Text] via [crate::parsing::lexer::token_kind_to_primitive].
Variants§
Implementations§
Source§impl ConversionTypeKind
impl ConversionTypeKind
Sourcepub fn to_primitive_kind(self) -> PrimitiveKind
pub fn to_primitive_kind(self) -> PrimitiveKind
The [PrimitiveKind] that corresponds to this conversion target kind.
Trait Implementations§
Source§impl Clone for ConversionTypeKind
impl Clone for ConversionTypeKind
impl Copy for ConversionTypeKind
Source§impl Debug for ConversionTypeKind
impl Debug for ConversionTypeKind
Source§impl<'de> Deserialize<'de> for ConversionTypeKind
impl<'de> Deserialize<'de> for ConversionTypeKind
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 Display for ConversionTypeKind
impl Display for ConversionTypeKind
impl Eq for ConversionTypeKind
Source§impl Hash for ConversionTypeKind
impl Hash for ConversionTypeKind
Source§impl PartialEq for ConversionTypeKind
impl PartialEq for ConversionTypeKind
Source§impl Serialize for ConversionTypeKind
impl Serialize for ConversionTypeKind
impl StructuralPartialEq for ConversionTypeKind
Auto Trait Implementations§
impl Forget for ConversionTypeKind
impl Freeze for ConversionTypeKind
impl RefUnwindSafe for ConversionTypeKind
impl Send for ConversionTypeKind
impl Sync for ConversionTypeKind
impl Unpin for ConversionTypeKind
impl UnsafeUnpin for ConversionTypeKind
impl UnwindSafe for ConversionTypeKind
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.