pub struct Schema { /* private fields */ }Expand description
The fields of a collection.
Implementations§
Source§impl Schema
impl Schema
pub fn new(collection: impl Into<String>) -> Self
Sourcepub fn field(self, name: impl Into<String>, crdt: CrdtType, tier: Tier) -> Self
pub fn field(self, name: impl Into<String>, crdt: CrdtType, tier: Tier) -> Self
Declare a field (builder style). A Register/Counter/Text/Set at a
Convergent/Causal/Strong tier.
pub fn collection(&self) -> &str
pub fn spec(&self, field: &str) -> Option<FieldSpec>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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