pub enum TypeSpecification {
Boolean {
help: Option<String>,
default: Option<bool>,
},
Scale {
minimum: Option<Decimal>,
maximum: Option<Decimal>,
decimals: Option<u8>,
precision: Option<Decimal>,
units: Vec<Unit>,
help: Option<String>,
default: Option<(Decimal, String)>,
},
Number {
minimum: Option<Decimal>,
maximum: Option<Decimal>,
decimals: Option<u8>,
precision: Option<Decimal>,
help: Option<String>,
default: Option<Decimal>,
},
Ratio {
minimum: Option<Decimal>,
maximum: Option<Decimal>,
units: Vec<Unit>,
help: Option<String>,
default: Option<Decimal>,
},
Text {
minimum: Option<usize>,
maximum: Option<usize>,
length: Option<usize>,
options: Vec<String>,
help: Option<String>,
default: Option<String>,
},
Date {
minimum: Option<DateTimeValue>,
maximum: Option<DateTimeValue>,
help: Option<String>,
default: Option<DateTimeValue>,
},
Time {
minimum: Option<TimeValue>,
maximum: Option<TimeValue>,
help: Option<String>,
default: Option<TimeValue>,
},
Duration {
help: Option<String>,
default: Option<(Decimal, DurationUnit)>,
},
Veto {
message: Option<String>,
},
}Expand description
Type specifications that define the foundational types available in Lemma, including their default values and constraints.
Variants§
Boolean
Scale
Fields
Number
Fields
Ratio
Fields
Text
Fields
Date
Time
Fields
Duration
Veto
Implementations§
Trait Implementations§
Source§impl Clone for TypeSpecification
impl Clone for TypeSpecification
Source§fn clone(&self) -> TypeSpecification
fn clone(&self) -> TypeSpecification
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 TypeSpecification
impl Debug for TypeSpecification
Source§impl<'de> Deserialize<'de> for TypeSpecification
impl<'de> Deserialize<'de> for TypeSpecification
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 Hash for TypeSpecification
impl Hash for TypeSpecification
Source§impl PartialEq for TypeSpecification
impl PartialEq for TypeSpecification
Source§impl Serialize for TypeSpecification
impl Serialize for TypeSpecification
impl Eq for TypeSpecification
impl StructuralPartialEq for TypeSpecification
Auto Trait Implementations§
impl Freeze for TypeSpecification
impl RefUnwindSafe for TypeSpecification
impl Send for TypeSpecification
impl Sync for TypeSpecification
impl Unpin for TypeSpecification
impl UnwindSafe for TypeSpecification
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more