pub struct FieldDescriptor { /* private fields */ }Expand description
The stable replicated contract for one record field.
Implementations§
Source§impl FieldDescriptor
impl FieldDescriptor
Sourcepub fn new(
id: u32,
name: impl Into<String>,
crdt: CrdtKind,
value_type: impl Into<String>,
) -> FieldDescriptor
pub fn new( id: u32, name: impl Into<String>, crdt: CrdtKind, value_type: impl Into<String>, ) -> FieldDescriptor
Declares a replicated field.
Sourcepub const fn indexed(self) -> FieldDescriptor
pub const fn indexed(self) -> FieldDescriptor
Marks this field as a materialized secondary index.
Sourcepub const fn record_id(self) -> FieldDescriptor
pub const fn record_id(self) -> FieldDescriptor
Marks this field as the unique record identifier.
Sourcepub fn value_type(&self) -> &str
pub fn value_type(&self) -> &str
Returns the stable logical value-type name.
Sourcepub const fn is_indexed(&self) -> bool
pub const fn is_indexed(&self) -> bool
Returns whether the field has a secondary index.
Sourcepub const fn is_record_id(&self) -> bool
pub const fn is_record_id(&self) -> bool
Returns whether the field is the record identifier.
Trait Implementations§
Source§impl Clone for FieldDescriptor
impl Clone for FieldDescriptor
Source§fn clone(&self) -> FieldDescriptor
fn clone(&self) -> FieldDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldDescriptor
impl Debug for FieldDescriptor
Source§impl PartialEq for FieldDescriptor
impl PartialEq for FieldDescriptor
impl Eq for FieldDescriptor
impl StructuralPartialEq for FieldDescriptor
Auto Trait Implementations§
impl Freeze for FieldDescriptor
impl RefUnwindSafe for FieldDescriptor
impl Send for FieldDescriptor
impl Sync for FieldDescriptor
impl Unpin for FieldDescriptor
impl UnwindSafe for FieldDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more