pub trait WriteSource<M, PK>: ReadSource<M, PK> {
Show 14 methods
// Required methods
fn create_allow_policies(&self) -> &'static [ReadPolicy];
fn create_deny_policies(&self) -> &'static [ReadPolicy];
fn update_allow_policies(&self) -> &'static [ReadPolicy];
fn update_deny_policies(&self) -> &'static [ReadPolicy];
fn delete_allow_policies(&self) -> &'static [ReadPolicy];
fn delete_deny_policies(&self) -> &'static [ReadPolicy];
fn create_defaults(&self) -> &'static [CreateDefault];
fn emitted_events(&self) -> &'static [ModelEventKind];
fn version_column(&self) -> Option<&'static str>;
fn audit_enabled(&self) -> bool;
fn pii_columns(&self) -> &'static [&'static str];
fn sensitive_columns(&self) -> &'static [&'static str];
fn retention_days(&self) -> Option<u32>;
fn upsert_update_columns(&self) -> &'static [&'static str];
}Expand description
Anything a write-path query builder needs on top of
ReadSource — create defaults, update / delete policy slots,
audit + retention + versioning state, upsert column list, emitted
event topics.
Implemented by ModelDescriptor only.
Views do not implement this trait, so the type system refuses to
route a view through CreateRecord / UpdateRecord /
DeleteRecord / UpsertModelInput.
Required Methods§
fn create_allow_policies(&self) -> &'static [ReadPolicy]
fn create_deny_policies(&self) -> &'static [ReadPolicy]
fn update_allow_policies(&self) -> &'static [ReadPolicy]
fn update_deny_policies(&self) -> &'static [ReadPolicy]
fn delete_allow_policies(&self) -> &'static [ReadPolicy]
fn delete_deny_policies(&self) -> &'static [ReadPolicy]
fn create_defaults(&self) -> &'static [CreateDefault]
fn emitted_events(&self) -> &'static [ModelEventKind]
Sourcefn version_column(&self) -> Option<&'static str>
fn version_column(&self) -> Option<&'static str>
Optimistic-locking version column (@version). None for
non-versioned models.
Sourcefn audit_enabled(&self) -> bool
fn audit_enabled(&self) -> bool
true when the model declared @@audit.
fn pii_columns(&self) -> &'static [&'static str]
fn sensitive_columns(&self) -> &'static [&'static str]
Sourcefn retention_days(&self) -> Option<u32>
fn retention_days(&self) -> Option<u32>
Soft-delete retention window. Surfaced here (alongside the
soft-delete column on ReadSource) so the operator’s GC
job can read both pieces from one place.
Sourcefn upsert_update_columns(&self) -> &'static [&'static str]
fn upsert_update_columns(&self) -> &'static [&'static str]
Columns the upsert primitive is allowed to overwrite on conflict.