pub enum Query<T: ShoalTable + Debug> {
Insert {
key: u64,
row: T,
},
Get(Get<T>),
Delete {
key: u64,
sort_key: T::Sort,
},
Update(Update<T>),
}Expand description
The different types of queries for a single datatype
Variants§
Insert
Insert a row into shoal
Get(Get<T>)
Get some data from shoal
Delete
Delete a row from shoal
Update(Update<T>)
Update a row in a shoal
Implementations§
Source§impl<T: ShoalTable + Debug> Query<T>
impl<T: ShoalTable + Debug> Query<T>
pub fn find_shard<'a>(&self, ring: &'a Ring, tmp: &mut Vec<&'a ShardInfo>)
Trait Implementations§
Source§impl<T> Archive for Query<T>
impl<T> Archive for Query<T>
Source§type Archived = ArchivedQuery<T>
type Archived = ArchivedQuery<T>
The archived representation of this type. Read more
Source§type Resolver = QueryResolver<T>
type Resolver = QueryResolver<T>
The resolver for this type. It must contain all the additional
information from serializing needed to make the archived type from
the normal type.
Source§fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
Creates the archived version of this value at the given position and
writes it to the given output. Read more
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
An optimization flag that allows the bytes of this type to be copied
directly to a writer instead of calling
serialize. Read moreSource§impl<__D: Fallible + ?Sized, T> Deserialize<Query<T>, __D> for Archived<Query<T>>where
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
T: Archive + ShoalTable + Debug,
<T as Archive>::Archived: Deserialize<T, __D>,
Get<T>: Archive,
<Get<T> as Archive>::Archived: Deserialize<Get<T>, __D>,
T::Sort: Archive,
<T::Sort as Archive>::Archived: Deserialize<T::Sort, __D>,
Update<T>: Archive,
<Update<T> as Archive>::Archived: Deserialize<Update<T>, __D>,
impl<__D: Fallible + ?Sized, T> Deserialize<Query<T>, __D> for Archived<Query<T>>where
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
T: Archive + ShoalTable + Debug,
<T as Archive>::Archived: Deserialize<T, __D>,
Get<T>: Archive,
<Get<T> as Archive>::Archived: Deserialize<Get<T>, __D>,
T::Sort: Archive,
<T::Sort as Archive>::Archived: Deserialize<T::Sort, __D>,
Update<T>: Archive,
<Update<T> as Archive>::Archived: Deserialize<Update<T>, __D>,
Auto Trait Implementations§
impl<T> Freeze for Query<T>where
T: Freeze,
<T as ShoalTable>::Sort: Freeze,
<T as ShoalTable>::Update: Freeze,
<T as ShoalTable>::Filters: Freeze,
impl<T> RefUnwindSafe for Query<T>where
T: RefUnwindSafe,
<T as ShoalTable>::Sort: RefUnwindSafe,
<T as ShoalTable>::Update: RefUnwindSafe,
<T as ShoalTable>::Filters: RefUnwindSafe,
impl<T> Send for Query<T>where
T: Send,
<T as ShoalTable>::Sort: Send,
<T as ShoalTable>::Update: Send,
<T as ShoalTable>::Filters: Send,
impl<T> Sync for Query<T>where
T: Sync,
<T as ShoalTable>::Sort: Sync,
<T as ShoalTable>::Update: Sync,
<T as ShoalTable>::Filters: Sync,
impl<T> Unpin for Query<T>where
T: Unpin,
<T as ShoalTable>::Sort: Unpin,
<T as ShoalTable>::Update: Unpin,
<T as ShoalTable>::Filters: Unpin,
impl<T> UnwindSafe for Query<T>where
T: UnwindSafe,
<T as ShoalTable>::Sort: UnwindSafe,
<T as ShoalTable>::Update: UnwindSafe,
<T as ShoalTable>::Filters: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
Creates the archived version of the metadata for this value.
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.