pub struct SourceSet<T, const N: usize>(/* private fields */);Expand description
A SourceProvider backed by an ArrayVec.
Internally, the SourceSet stores an Option<T> for each planned SourceId
which are Option::taken out of the set.
Implementations§
Source§impl<T, const N: usize> SourceSet<T, N>
impl<T, const N: usize> SourceSet<T, N>
Sourcepub fn add(&mut self, table: T) -> SourceId
pub fn add(&mut self, table: T) -> SourceId
Insert an entry into this SourceSet so it can be used in a query plan,
and return a SourceId which can be embedded in that plan.
Sourcepub fn take(&mut self, id: SourceId) -> Option<T>
pub fn take(&mut self, id: SourceId) -> Option<T>
Extract the entry referred to by id from this SourceSet,
leaving a “gap” in its place.
Subsequent calls to take on the same id will return None.
Source§impl<const N: usize> SourceSet<Vec<ProductValue>, N>
impl<const N: usize> SourceSet<Vec<ProductValue>, N>
Sourcepub fn add_mem_table(&mut self, table: MemTable) -> SourceExpr
pub fn add_mem_table(&mut self, table: MemTable) -> SourceExpr
Insert a MemTable into this SourceSet so it can be used in a query plan,
and return a SourceExpr which can be embedded in that plan.
Trait Implementations§
Source§impl<'a, T: 'a + IntoIterator<Item = RelValue<'a>>, const N: usize> SourceProvider<'a> for SourceSet<T, N>
impl<'a, T: 'a + IntoIterator<Item = RelValue<'a>>, const N: usize> SourceProvider<'a> for SourceSet<T, N>
impl<T: Eq, const N: usize> Eq for SourceSet<T, N>
impl<T, const N: usize> StructuralPartialEq for SourceSet<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for SourceSet<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for SourceSet<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for SourceSet<T, N>where
T: Send,
impl<T, const N: usize> Sync for SourceSet<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for SourceSet<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for SourceSet<T, N>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more