pub(crate) struct ChoirPolicy {
pub(crate) registry: Registry,
pub(crate) view: View,
}Expand description
The production admission shape: verify the author’s signature, then CAS the op against a view cached on the writer thread.
Fields§
§registry: Registry§view: ViewTrait Implementations§
Source§impl SubmitPolicy for ChoirPolicy
impl SubmitPolicy for ChoirPolicy
Source§fn check(&mut self, sub: &Submission) -> Result<(), String>
fn check(&mut self, sub: &Submission) -> Result<(), String>
Accepts or rejects a submission. Runs on the writer thread, so a
stateful policy (e.g. one holding a cached materialized view) sees
submissions in their final total order. Read more
Source§fn accepted(&mut self, entry: &OpEntry, _hash: &ContentHash)
fn accepted(&mut self, entry: &OpEntry, _hash: &ContentHash)
Observes an entry that was just appended (for cached-state
policies to fold). Default: ignore. Read more
Source§fn subject(&self) -> (Option<String>, Option<String>)
fn subject(&self) -> (Option<String>, Option<String>)
What the last
SubmitPolicy::check identified about its
submission: (actor_id, op_type), for the journal. Read moreSource§fn replicable(&mut self, _entry: &OpEntry) -> Result<(), String>
fn replicable(&mut self, _entry: &OpEntry) -> Result<(), String>
Whether an entry another writer already sequenced can be folded
here, asked by
SequencerHandle::replicate before it appends
one. Default: yes. Read moreAuto Trait Implementations§
impl Freeze for ChoirPolicy
impl RefUnwindSafe for ChoirPolicy
impl Send for ChoirPolicy
impl Sync for ChoirPolicy
impl Unpin for ChoirPolicy
impl UnsafeUnpin for ChoirPolicy
impl UnwindSafe for ChoirPolicy
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