pub trait SurrealRecord:
Sized
+ Send
+ Sync
+ 'static
+ Debug
+ Clone {
// Required methods
fn table_name() -> &'static str;
fn primary_key() -> &'static str;
}Expand description
A type that maps to a SurrealDB table. Normally implemented by
#[derive(SurrealRecord)], which also generates the typed column accessors and
the query-builder entry points (table(), all()).
Required Methods§
Sourcefn table_name() -> &'static str
fn table_name() -> &'static str
The SurrealDB table name (e.g. "post").
Sourcefn primary_key() -> &'static str
fn primary_key() -> &'static str
The record-id field name (the #[field(thing)] field; defaults to "id").
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".