pub enum StringOrBool {
Bool(bool),
String(String),
}Expand description
A value that can be either a string or a boolean.
This is used for default values where boolean columns can use true/false directly.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for StringOrBool
impl Clone for StringOrBool
Source§fn clone(&self) -> StringOrBool
fn clone(&self) -> StringOrBool
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 StringOrBool
impl Debug for StringOrBool
Source§impl<'de> Deserialize<'de> for StringOrBool
impl<'de> Deserialize<'de> for StringOrBool
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 From<&str> for StringOrBool
impl From<&str> for StringOrBool
Source§impl From<String> for StringOrBool
impl From<String> for StringOrBool
Source§impl From<bool> for StringOrBool
impl From<bool> for StringOrBool
Source§impl JsonSchema for StringOrBool
impl JsonSchema for StringOrBool
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 StringOrBool
impl PartialEq for StringOrBool
Source§impl Serialize for StringOrBool
impl Serialize for StringOrBool
impl Eq for StringOrBool
impl StructuralPartialEq for StringOrBool
Auto Trait Implementations§
impl Freeze for StringOrBool
impl RefUnwindSafe for StringOrBool
impl Send for StringOrBool
impl Sync for StringOrBool
impl Unpin for StringOrBool
impl UnwindSafe for StringOrBool
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