[][src]Struct tablam::schema::Schema

pub struct Schema {
    pub pk: Option<usize>,
    pub fields: Vec<Field>,
}

Fields

pk: Option<usize>fields: Vec<Field>

Implementations

impl Schema[src]

pub fn new(fields: Vec<Field>, pk: Option<usize>) -> Self[src]

pub fn new_single(name: &str, kind: DataType) -> Self[src]

pub fn scalar_field(kind: DataType) -> Self[src]

pub fn named(&self, name: &str) -> Option<(usize, &Field)>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn pk_field(&self) -> Option<Field>[src]

pub fn resolve_name(&self, of: &Column) -> (usize, Field)[src]

pub fn resolve_pos(&self, of: &Column) -> usize[src]

Recover the column position from the relative ColumnName

pub fn resolve_pos_many(&self, of: &[Column]) -> Pos[src]

pub fn pick_new_pk(&mut self, old: Option<Field>)[src]

pub fn extend(&self, right: &Schema) -> Self[src]

pub fn project(&self, select: &ProjectDef) -> (Schema, Pos)[src]

pub fn kind(&self) -> Vec<DataType>[src]

Trait Implementations

impl Clone for Schema[src]

impl Debug for Schema[src]

impl Display for Schema[src]

impl Eq for Schema[src]

impl Hash for Schema[src]

impl Index<usize> for Schema[src]

type Output = Field

The returned type after indexing.

impl Ord for Schema[src]

impl PartialEq<Schema> for Schema[src]

impl PartialOrd<Schema> for Schema[src]

Auto Trait Implementations

impl RefUnwindSafe for Schema

impl Send for Schema

impl Sync for Schema

impl Unpin for Schema

impl UnwindSafe for Schema

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.