pub enum SettingValue {
Int(i64),
Bool(bool),
Float(f64),
String(String),
}
Expand description
Supported value types for ClickHouse
query settings.
This enum represents the possible data types for a Setting
’s value, including
integers, booleans, floats, and strings. It implements From
for various Rust
primitive types (e.g., i32
, &str
, f64
) to simplify setting creation.
§Variants
Int(i64)
: A 64-bit integer (e.g., formax_threads
).Bool(bool)
: A boolean (e.g., forallow_experimental_features
).Float(f64)
: A 64-bit float (e.g., forquantile
).String(String)
: A string (e.g., fordefault_format
).
§Example
ⓘ
use clickhouse_arrow::query::settings::SettingValue;
let int_value: SettingValue = 8_i32.into();
let bool_value: SettingValue = true.into();
let string_value: SettingValue = "JSON".to_string().into();
assert!(matches!(int_value, SettingValue::Int(8)));
Variants§
Trait Implementations§
Source§impl Clone for SettingValue
impl Clone for SettingValue
Source§fn clone(&self) -> SettingValue
fn clone(&self) -> SettingValue
Returns a duplicate 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 SettingValue
impl Debug for SettingValue
Source§impl<'de> Deserialize<'de> for SettingValue
impl<'de> Deserialize<'de> for SettingValue
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 SettingValue
impl Display for SettingValue
Source§impl From<&str> for SettingValue
impl From<&str> for SettingValue
Source§impl From<String> for SettingValue
impl From<String> for SettingValue
Source§impl From<bool> for SettingValue
impl From<bool> for SettingValue
Source§impl From<f32> for SettingValue
impl From<f32> for SettingValue
Source§impl From<f64> for SettingValue
impl From<f64> for SettingValue
Source§impl From<i16> for SettingValue
impl From<i16> for SettingValue
Source§impl From<i32> for SettingValue
impl From<i32> for SettingValue
Source§impl From<i64> for SettingValue
impl From<i64> for SettingValue
Source§impl From<i8> for SettingValue
impl From<i8> for SettingValue
Source§impl From<u16> for SettingValue
impl From<u16> for SettingValue
Source§impl From<u32> for SettingValue
impl From<u32> for SettingValue
Source§impl From<u64> for SettingValue
impl From<u64> for SettingValue
Source§impl From<u8> for SettingValue
impl From<u8> for SettingValue
Source§impl PartialEq for SettingValue
impl PartialEq for SettingValue
Source§impl PartialOrd for SettingValue
impl PartialOrd for SettingValue
Source§impl Serialize for SettingValue
impl Serialize for SettingValue
impl Eq for SettingValue
impl StructuralPartialEq for SettingValue
Auto Trait Implementations§
impl Freeze for SettingValue
impl RefUnwindSafe for SettingValue
impl Send for SettingValue
impl Sync for SettingValue
impl Unpin for SettingValue
impl UnwindSafe for SettingValue
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.