Struct fdb::tuple::TupleSchema
source · pub struct TupleSchema { /* private fields */ }Expand description
Represents a schema for a Tuple.
A TupleSchema consists of
TupleSchemaElements. TupleSchema::validate method can be
used to verify the conformance of a value of Tuple to its
schema.
Implementations§
source§impl TupleSchema
impl TupleSchema
sourcepub fn new() -> TupleSchema
pub fn new() -> TupleSchema
Create a new TupleSchema
sourcepub fn get(&self, index: usize) -> Option<&TupleSchemaElement>
pub fn get(&self, index: usize) -> Option<&TupleSchemaElement>
Provides a reference to TupleSchemaElement at the given
index.
sourcepub fn pop_back(&mut self) -> Option<TupleSchemaElement>
pub fn pop_back(&mut self) -> Option<TupleSchemaElement>
Removes the last TupleSchemaElement from the
TupleSchema and returns it, or None if it is empty.
sourcepub fn pop_front(&mut self) -> Option<TupleSchemaElement>
pub fn pop_front(&mut self) -> Option<TupleSchemaElement>
Removes the first TupleSchemaElement from the
TupleSchema and returns it, or None if it is empty.
sourcepub fn push_back(&mut self, value: TupleSchemaElement)
pub fn push_back(&mut self, value: TupleSchemaElement)
Appends a TupleSchemaElement.
sourcepub fn push_front(&mut self, value: TupleSchemaElement)
pub fn push_front(&mut self, value: TupleSchemaElement)
Prepends a TupleSchemaElement.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the TupleSchema is empty.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of TupleSchemaElement’s in the
TupleSchema.
sourcepub fn iter(&self) -> Iter<'_, TupleSchemaElement>
pub fn iter(&self) -> Iter<'_, TupleSchemaElement>
Returns an iterator of TupleSchemaElement.
Trait Implementations§
source§impl Clone for TupleSchema
impl Clone for TupleSchema
source§fn clone(&self) -> TupleSchema
fn clone(&self) -> TupleSchema
Returns a copy 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 TupleSchema
impl Debug for TupleSchema
source§impl Default for TupleSchema
impl Default for TupleSchema
source§fn default() -> TupleSchema
fn default() -> TupleSchema
Returns the “default value” for a type. Read more
source§impl PartialEq<TupleSchema> for TupleSchema
impl PartialEq<TupleSchema> for TupleSchema
source§fn eq(&self, other: &TupleSchema) -> bool
fn eq(&self, other: &TupleSchema) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for TupleSchema
Auto Trait Implementations§
impl RefUnwindSafe for TupleSchema
impl Send for TupleSchema
impl Sync for TupleSchema
impl Unpin for TupleSchema
impl UnwindSafe for TupleSchema
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