pub trait SqlStruct: Sized {
const FIELDS: &'static [FieldMeta];
// Required methods
fn values(&self) -> Vec<Arg>;
fn is_empty_field(&self, rust_field: &'static str) -> bool;
fn addr_cells<'a>(
&'a mut self,
rust_fields: &[&'static str],
) -> Option<Vec<ScanCell<'a>>>;
}Expand description
Trait implemented by the macro for your structs: exposes metadata, values, and emptiness checks.
Required Associated Constants§
Required Methods§
Sourcefn is_empty_field(&self, rust_field: &'static str) -> bool
fn is_empty_field(&self, rust_field: &'static str) -> bool
Check whether a field is “empty” (used for omitempty).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.