Skip to main content

oxiphysics_io/database_io/
dbvalue_traits.rs

1//! # DbValue - Trait Implementations
2//!
3//! This module contains trait implementations for `DbValue`.
4//!
5//! ## Implemented Traits
6//!
7//! - `From`
8//! - `From`
9//! - `From`
10//! - `From`
11//!
12//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
13
14#[allow(unused_imports)]
15use super::functions::*;
16use super::types::DbValue;
17
18impl From<f64> for DbValue {
19    fn from(v: f64) -> Self {
20        DbValue::Float(v)
21    }
22}
23
24impl From<i64> for DbValue {
25    fn from(v: i64) -> Self {
26        DbValue::Int(v)
27    }
28}
29
30impl From<&str> for DbValue {
31    fn from(v: &str) -> Self {
32        DbValue::Text(v.to_string())
33    }
34}
35
36impl From<bool> for DbValue {
37    fn from(v: bool) -> Self {
38        DbValue::Bool(v)
39    }
40}