Struct spacetimedb_sats::db::def::ColumnDef
source · pub struct ColumnDef {
pub col_name: String,
pub col_type: AlgebraicType,
}
Expand description
A struct representing the definition of a database column.
Fields§
§col_name: String
§col_type: AlgebraicType
Implementations§
source§impl ColumnDef
impl ColumnDef
sourcepub fn sys(field_name: &str, col_type: AlgebraicType) -> Self
pub fn sys(field_name: &str, col_type: AlgebraicType) -> Self
Creates a new ColumnDef for a system field with the specified data type.
This method is typically used to define system columns with predefined names and data types.
§Arguments
field_name
: The name for which to create a column definition.col_type
: The AlgebraicType of the column.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ColumnDef
impl<'de> Deserialize<'de> for ColumnDef
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given
deserializer
.source§impl From<ColumnSchema> for ColumnDef
impl From<ColumnSchema> for ColumnDef
source§fn from(value: ColumnSchema) -> Self
fn from(value: ColumnSchema) -> Self
Converts to this type from the input type.
source§impl Ord for ColumnDef
impl Ord for ColumnDef
source§impl PartialEq for ColumnDef
impl PartialEq for ColumnDef
source§impl PartialOrd for ColumnDef
impl PartialOrd for ColumnDef
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ColumnDef
impl StructuralPartialEq for ColumnDef
Auto Trait Implementations§
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin for ColumnDef
impl UnwindSafe for ColumnDef
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Satn for T
impl<T> Satn for T
source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the SATN data format into the formatter
f
.source§fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the postgres SATN data format into the formatter
f
.source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
Formats the value using the SATN data format into the returned
String
.source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
Pretty prints the value using the SATN data format into the returned
String
.