pub struct Table { /* private fields */ }Implementations§
source§impl Table
impl Table
pub fn new(column_names: Vec<String>) -> Self
pub fn reserve(&mut self, additional: usize)
pub fn column_names(&self) -> &Vec<String>
pub fn rows(&self) -> &Vec<Vec<Value>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn sort(&mut self)
pub fn insert(&mut self, row: Vec<Value>) -> Result<()>
pub fn remove(&mut self, index: usize) -> Result<()>
pub fn get_row(&self, index: usize) -> Option<&Vec<Value>>
pub fn get(&self, value: &Value) -> Option<&Vec<Value>>
pub fn select(&self, column_names: &[String]) -> Table
pub fn get_where( &self, column_name: &str, expected: &Value ) -> Option<&Vec<Value>>
pub fn filter(&self, column_name: &str, expected: &Value) -> Option<Table>
pub fn get_column_index(&self, column_name: &str) -> Option<usize>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Table
impl<'de> Deserialize<'de> for Table
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&Table> for VariableMap
impl From<&Table> for VariableMap
source§impl From<&VariableMap> for Table
impl From<&VariableMap> for Table
source§fn from(map: &VariableMap) -> Self
fn from(map: &VariableMap) -> Self
Converts to this type from the input type.
source§impl From<&mut VariableMap> for Table
impl From<&mut VariableMap> for Table
source§fn from(map: &mut VariableMap) -> Self
fn from(map: &mut VariableMap) -> Self
Converts to this type from the input type.
source§impl From<VariableMap> for Table
impl From<VariableMap> for Table
source§fn from(map: VariableMap) -> Self
fn from(map: VariableMap) -> Self
Converts to this type from the input type.
source§impl Ord for Table
impl Ord for Table
source§impl PartialEq<Table> for Table
impl PartialEq<Table> for Table
source§impl PartialOrd<Table> for Table
impl PartialOrd<Table> for Table
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Table
Auto Trait Implementations§
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.