pub enum EnumValues {
String(Vec<String>),
Integer(Vec<NumValue>),
}Expand description
Enum values definition - either all string or all integer
Variants§
Implementations§
Source§impl EnumValues
impl EnumValues
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Check if this is an integer enum
Sourcepub fn variant_names(&self) -> Vec<&str>
pub fn variant_names(&self) -> Vec<&str>
Get all variant names
Sourcepub fn to_sql_values(&self) -> Vec<String>
pub fn to_sql_values(&self) -> Vec<String>
Get SQL values for CREATE TYPE ENUM (only for string enums) Returns quoted strings like ‘value1’, ‘value2’
Trait Implementations§
Source§impl Clone for EnumValues
impl Clone for EnumValues
Source§fn clone(&self) -> EnumValues
fn clone(&self) -> EnumValues
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 EnumValues
impl Debug for EnumValues
Source§impl<'de> Deserialize<'de> for EnumValues
impl<'de> Deserialize<'de> for EnumValues
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 JsonSchema for EnumValues
impl JsonSchema for EnumValues
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for EnumValues
impl PartialEq for EnumValues
Source§impl Serialize for EnumValues
impl Serialize for EnumValues
impl Eq for EnumValues
impl StructuralPartialEq for EnumValues
Auto Trait Implementations§
impl Freeze for EnumValues
impl RefUnwindSafe for EnumValues
impl Send for EnumValues
impl Sync for EnumValues
impl Unpin for EnumValues
impl UnwindSafe for EnumValues
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