pub(crate) enum Promotion {
Direct,
IntToLong,
IntToFloat,
IntToDouble,
LongToFloat,
LongToDouble,
FloatToDouble,
StringToBytes,
BytesToString,
}Expand description
Defines the type of promotion to be applied during schema resolution.
Schema resolution may require promoting a writer’s data type to a reader’s data type.
For example, an int can be promoted to a long, float, or double.
Variants§
Direct
Direct read with no data type promotion.
IntToLong
Promotes an int to a long.
IntToFloat
Promotes an int to a float.
IntToDouble
Promotes an int to a double.
LongToFloat
Promotes a long to a float.
LongToDouble
Promotes a long to a double.
FloatToDouble
Promotes a float to a double.
StringToBytes
Promotes a string to bytes.
BytesToString
Promotes bytes to a string.
Trait Implementations§
impl Copy for Promotion
impl Eq for Promotion
impl StructuralPartialEq for Promotion
Auto Trait Implementations§
impl Freeze for Promotion
impl RefUnwindSafe for Promotion
impl Send for Promotion
impl Sync for Promotion
impl Unpin for Promotion
impl UnwindSafe for Promotion
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.