pub enum CastType {
Int,
Float,
Bool,
String,
Timestamp,
}Available on crate feature
transform-cast only.Expand description
Target type for RecordTransform::Cast.
Coerces a JSON value to the requested concrete type. Timestamp parses
RFC 3339 / ISO 8601 strings and normalises them back to RFC 3339 (so
"2026-05-28T00:00:00Z" round-trips unchanged but "2026-05-28T00:00:00+00:00"
becomes the canonical form).
Variants§
Int
64-bit signed integer (i64).
Float
64-bit float (f64).
Bool
Boolean. Accepts true/false/1/0 (case-insensitive) when the
source value is a string.
String
String. Numbers and booleans are stringified via to_string().
Timestamp
RFC 3339 timestamp, returned as a normalised RFC 3339 string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CastType
impl<'de> Deserialize<'de> for CastType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CastType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CastType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for CastType
impl JsonSchema for CastType
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for CastType
impl Serialize for CastType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for CastType
impl Eq for CastType
impl StructuralPartialEq for CastType
Auto Trait Implementations§
impl Freeze for CastType
impl RefUnwindSafe for CastType
impl Send for CastType
impl Sync for CastType
impl Unpin for CastType
impl UnsafeUnpin for CastType
impl UnwindSafe for CastType
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> 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.