Enum bonsaidb_core::connection::QueryKey
source · pub enum QueryKey<'k, KOwned, KBorrowed = KOwned>where
KBorrowed: PartialEq + ?Sized,
KOwned: Borrow<KBorrowed> + PartialEq<KBorrowed>,{
Matches(MaybeOwned<'k, KOwned, KBorrowed>),
Range(RangeRef<'k, KOwned, KBorrowed>),
Multiple(Vec<MaybeOwned<'k, KOwned, KBorrowed>>),
}
Expand description
Filters a View
by key.
Variants§
Matches(MaybeOwned<'k, KOwned, KBorrowed>)
Matches all entries with the key provided.
Range(RangeRef<'k, KOwned, KBorrowed>)
Matches all entires with keys in the range provided.
Multiple(Vec<MaybeOwned<'k, KOwned, KBorrowed>>)
Matches all entries that have keys that are included in the set provided.
Implementations§
source§impl<'a, KOwned, KBorrowed> QueryKey<'a, KOwned, KBorrowed>where
KBorrowed: KeyEncoding<KOwned> + PartialEq + ?Sized,
KOwned: for<'k> Key<'k> + Borrow<KBorrowed> + PartialEq<KBorrowed>,
impl<'a, KOwned, KBorrowed> QueryKey<'a, KOwned, KBorrowed>where KBorrowed: KeyEncoding<KOwned> + PartialEq + ?Sized, KOwned: for<'k> Key<'k> + Borrow<KBorrowed> + PartialEq<KBorrowed>,
sourcepub fn serialized(&self) -> Result<SerializedQueryKey, Error>
pub fn serialized(&self) -> Result<SerializedQueryKey, Error>
Converts this key to a serialized format using the Key
trait.
Trait Implementations§
Auto Trait Implementations§
impl<'k, KOwned, KBorrowed: ?Sized> RefUnwindSafe for QueryKey<'k, KOwned, KBorrowed>where KBorrowed: RefUnwindSafe, KOwned: RefUnwindSafe,
impl<'k, KOwned, KBorrowed: ?Sized> Send for QueryKey<'k, KOwned, KBorrowed>where KBorrowed: Sync, KOwned: Send,
impl<'k, KOwned, KBorrowed: ?Sized> Sync for QueryKey<'k, KOwned, KBorrowed>where KBorrowed: Sync, KOwned: Sync,
impl<'k, KOwned, KBorrowed: ?Sized> Unpin for QueryKey<'k, KOwned, KBorrowed>where KOwned: Unpin,
impl<'k, KOwned, KBorrowed: ?Sized> UnwindSafe for QueryKey<'k, KOwned, KBorrowed>where KBorrowed: RefUnwindSafe, KOwned: 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