pub enum RustType {
String,
Integer,
Float,
Bool,
Date,
Time,
Duration,
Option(Box<RustType>),
Array(Box<RustType>),
Custom(String),
Unknown,
}Expand description
Represents the Rust type equivalent of an ELO type
Variants§
String
String type (&str or String)
Integer
Integer type (i64 or i32)
Float
Float type (f64 or f32)
Bool
Boolean type
Date
Date type (chrono::NaiveDate)
Time
Time type (chrono::NaiveTime)
Duration
Duration type (chrono::Duration)
Option(Box<RustType>)
Option type
Array(Box<RustType>)
Array/slice type
Custom(String)
Custom user-defined type
Unknown
Unknown/unresolved type
Implementations§
Source§impl RustType
impl RustType
Sourcepub fn to_rust_string(&self) -> String
pub fn to_rust_string(&self) -> String
Get the Rust type string representation
Sourcepub fn is_compatible_with(&self, other: &RustType) -> bool
pub fn is_compatible_with(&self, other: &RustType) -> bool
Check if this type is compatible with another type
Trait Implementations§
impl Eq for RustType
impl StructuralPartialEq for RustType
Auto Trait Implementations§
impl Freeze for RustType
impl RefUnwindSafe for RustType
impl Send for RustType
impl Sync for RustType
impl Unpin for RustType
impl UnwindSafe for RustType
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