pub enum CrdtKind {
Set,
SetRemoveWins,
Seq,
Register,
Counter,
PnCounter,
Map,
}Expand description
Every kind of CRDT the language has — the ONE table for what each is called in source, the code a
NewCrdt op carries in bytecode, and the tag its full state / deltas carry on the wire. Both codes
are stable wire formats: never renumber one.
Variants§
Implementations§
Source§impl CrdtKind
impl CrdtKind
pub const ALL: [CrdtKind; 7]
Sourcepub fn of_type_name(name: &str) -> Option<CrdtKind>
pub fn of_type_name(name: &str) -> Option<CrdtKind>
The CRDT a declared field type names, or None for a type that is not one.
Sourcepub const fn lowered_by(self, backend: Backend) -> bool
pub const fn lowered_by(self, backend: Backend) -> bool
Whether backend lowers this CRDT — single-replica, running identically to the interpreter and
the VM. crate::compile::refuse_unlinkable refuses a program that builds a kind its backend
answers false for, naming the type. Exhaustive over kind × backend with no wildcard, so a new
kind or a new backend does not compile until every pair is decided; crdt_backend_lock runs
every pair and holds each answer to what the backend actually does.
Sourcepub const fn new_crdt_code(self) -> u8
pub const fn new_crdt_code(self) -> u8
The kind a NewCrdt op carries in bytecode.
pub fn from_new_crdt_code(code: u8) -> Option<CrdtKind>
pub fn from_state_tag(tag: u8) -> Option<CrdtKind>
Trait Implementations§
impl Copy for CrdtKind
impl Eq for CrdtKind
impl StructuralPartialEq for CrdtKind
Auto Trait Implementations§
impl Freeze for CrdtKind
impl RefUnwindSafe for CrdtKind
impl Send for CrdtKind
impl Sync for CrdtKind
impl Unpin for CrdtKind
impl UnsafeUnpin for CrdtKind
impl UnwindSafe for CrdtKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.