pub trait SyncModel:
Model<PrimaryKey = Uuid>
+ Send
+ Sync
+ 'static {
const SYNC_NAME: &'static str;
const SYNC_VERSION: u32 = 1;
const AUTOMATIC_METADATA: bool = false;
const REVISION_COLUMN: &'static str = "revision";
const UPDATED_AT_COLUMN: &'static str = "updated_at";
const DELETED_AT_COLUMN: &'static str = "deleted_at";
const SCOPE_COLUMN: &'static str = "sync_scope";
// Required method
fn sync_fields() -> Vec<SyncField>;
// Provided methods
fn registered_fields() -> Vec<SyncField> { ... }
fn sync_schema() -> TableSchema { ... }
}Expand description
Shared model definition. Its client/server role belongs to registration.
Required Associated Constants§
Provided Associated Constants§
const SYNC_VERSION: u32 = 1
Sourceconst AUTOMATIC_METADATA: bool = false
const AUTOMATIC_METADATA: bool = false
Derived sync models keep service columns out of the Rust struct.
const REVISION_COLUMN: &'static str = "revision"
const UPDATED_AT_COLUMN: &'static str = "updated_at"
const DELETED_AT_COLUMN: &'static str = "deleted_at"
const SCOPE_COLUMN: &'static str = "sync_scope"
Required Methods§
fn sync_fields() -> Vec<SyncField>
Provided Methods§
fn registered_fields() -> Vec<SyncField>
Sourcefn sync_schema() -> TableSchema
fn sync_schema() -> TableSchema
Physical schema, including infrastructure-owned service columns.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".