pub struct Field {
pub name: String,
pub field_type: String,
pub default: Option<String>,
pub crdt: Option<String>,
pub relation: Option<String>,
}Expand description
A single field within an entity version.
Fields§
§name: StringField name in snake_case.
field_type: StringRust type as a string (e.g., "String", "Option<u8>", "Vec<String>").
default: Option<String>Default value expression (Rust literal). Required for fields added in later versions so that automatic migration can fill them in.
crdt: Option<String>CRDT type wrapping this field (e.g., "LWWRegister", "GCounter", "ORSet").
When set, the generated Rust type becomes CrdtType<field_type> (or just
CrdtType for counter types). Migration defaults are auto-generated.
relation: Option<String>Relation to another entity (e.g., "Project" means this field is a key
referencing a Project entity). Generates typed lookup helpers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
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
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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