pub struct InMemorySource { /* private fields */ }Implementations§
Source§impl InMemorySource
impl InMemorySource
pub fn load(reader: &mut dyn SourceReader, key_column: &str) -> Result<Self>
pub fn lookup(&self, key: &str) -> Option<&SourceRow>
pub fn contains(&self, key: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn headers(&self) -> &[String]
pub fn key_column(&self) -> &str
pub fn row_count(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = (&String, &SourceRow)>
Sourcepub fn filter(&self, conditions: &[FilterCondition]) -> Self
pub fn filter(&self, conditions: &[FilterCondition]) -> Self
Filter the in-memory source, keeping only rows that match ALL filter conditions.
Auto Trait Implementations§
impl Freeze for InMemorySource
impl RefUnwindSafe for InMemorySource
impl Send for InMemorySource
impl Sync for InMemorySource
impl Unpin for InMemorySource
impl UnsafeUnpin for InMemorySource
impl UnwindSafe for InMemorySource
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