Skip to main content

WriteSource

Trait WriteSource 

Source
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§

Source

fn create_allow_policies(&self) -> &'static [ReadPolicy]

Source

fn create_deny_policies(&self) -> &'static [ReadPolicy]

Source

fn update_allow_policies(&self) -> &'static [ReadPolicy]

Source

fn update_deny_policies(&self) -> &'static [ReadPolicy]

Source

fn delete_allow_policies(&self) -> &'static [ReadPolicy]

Source

fn delete_deny_policies(&self) -> &'static [ReadPolicy]

Source

fn create_defaults(&self) -> &'static [CreateDefault]

Source

fn emitted_events(&self) -> &'static [ModelEventKind]

Source

fn version_column(&self) -> Option<&'static str>

Optimistic-locking version column (@version). None for non-versioned models.

Source

fn audit_enabled(&self) -> bool

true when the model declared @@audit.

Source

fn pii_columns(&self) -> &'static [&'static str]

Source

fn sensitive_columns(&self) -> &'static [&'static str]

Source

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.

Source

fn upsert_update_columns(&self) -> &'static [&'static str]

Columns the upsert primitive is allowed to overwrite on conflict.

Implementors§

Source§

impl<M, PK> WriteSource<M, PK> for ModelDescriptor<M, PK>