pub struct ColumnInfo {
pub name: String,
pub column_type: String,
pub not_null: bool,
pub default_value: Option<String>,
pub primary_key: bool,
}Expand description
Metadata for a single column in a table, as reported by SQLite’s PRAGMA table_info.
Fields§
§name: StringThe column name.
column_type: StringThe declared type of the column (e.g. TEXT, INTEGER). May be empty
if the column was declared without a type.
not_null: boolWhether the column has a NOT NULL constraint.
default_value: Option<String>The default value expression, if one was specified in the column definition.
primary_key: boolWhether this column is part of the table’s primary key.
Trait Implementations§
Source§impl Clone for ColumnInfo
impl Clone for ColumnInfo
Source§fn clone(&self) -> ColumnInfo
fn clone(&self) -> ColumnInfo
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 ColumnInfo
impl Debug for ColumnInfo
Source§impl<'de> Deserialize<'de> for ColumnInfo
impl<'de> Deserialize<'de> for ColumnInfo
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 ColumnInfo
impl Hash for ColumnInfo
Source§impl JsonSchema for ColumnInfo
impl JsonSchema for ColumnInfo
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 Ord for ColumnInfo
impl Ord for ColumnInfo
Source§fn cmp(&self, other: &ColumnInfo) -> Ordering
fn cmp(&self, other: &ColumnInfo) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ColumnInfo
impl PartialEq for ColumnInfo
Source§impl PartialOrd for ColumnInfo
impl PartialOrd for ColumnInfo
Source§impl Serialize for ColumnInfo
impl Serialize for ColumnInfo
impl Eq for ColumnInfo
impl StructuralPartialEq for ColumnInfo
Auto Trait Implementations§
impl Freeze for ColumnInfo
impl RefUnwindSafe for ColumnInfo
impl Send for ColumnInfo
impl Sync for ColumnInfo
impl Unpin for ColumnInfo
impl UnsafeUnpin for ColumnInfo
impl UnwindSafe for ColumnInfo
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