Struct surrealml_core::storage::header::keys::KeyBindings
source · pub struct KeyBindings {
pub store: Vec<String>,
pub reference: HashMap<String, usize>,
}
Expand description
Defines the key bindings for input data.
§Fields
store
- A vector of strings that represent the column names. The order of this store is the same as the order in which the columns are expected in the input data.reference
- A hashmap that maps the column names to their index in theself.store
field.
Fields§
§store: Vec<String>
§reference: HashMap<String, usize>
Implementations§
source§impl KeyBindings
impl KeyBindings
sourcepub fn add_column(&mut self, column_name: String)
pub fn add_column(&mut self, column_name: String)
Adds a column name to the self.store
field. It must be noted that the order in which the columns are added is
the order in which they will be expected in the input data.
§Arguments
column_name
- The name of the column to be added.
sourcepub fn from_string(data: String) -> Self
pub fn from_string(data: String) -> Self
sourcepub fn from_bytes(data: &[u8]) -> Result<Self, SurrealError>
pub fn from_bytes(data: &[u8]) -> Result<Self, SurrealError>
Trait Implementations§
source§impl Debug for KeyBindings
impl Debug for KeyBindings
source§impl PartialEq for KeyBindings
impl PartialEq for KeyBindings
source§fn eq(&self, other: &KeyBindings) -> bool
fn eq(&self, other: &KeyBindings) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for KeyBindings
Auto Trait Implementations§
impl Freeze for KeyBindings
impl RefUnwindSafe for KeyBindings
impl Send for KeyBindings
impl Sync for KeyBindings
impl Unpin for KeyBindings
impl UnwindSafe for KeyBindings
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