pub struct FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>(/* private fields */)
where
K0: DataTrait + ?Sized,
A0: DataTrait + ?Sized,
K1: DataTrait + ?Sized,
A1: WeightTrait + ?Sized;
Expand description
Reads a subset of a 2-column Reader.
Builds an indexed Z-set containing just the rows from a 2-column reader with a specified set of first-column keys.
Implementations§
Source§impl<'a, 'b, K0, A0, K1, A1> FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
Sourcepub async fn async_results(
self,
factories: VecIndexedWSetFactories<K0, K1, A1>,
) -> Result<VecIndexedWSet<K0, K1, A1>, Error>
pub async fn async_results( self, factories: VecIndexedWSetFactories<K0, K1, A1>, ) -> Result<VecIndexedWSet<K0, K1, A1>, Error>
Fetches the indexed Z-set asynchronously and returns the results.
This is the main method to use in production to overlap I/O. With this function, It’s not necessary to call Self::is_done or Self::run or Self::wait.
Sourcepub fn wait(&mut self) -> Result<(), Error>
pub fn wait(&mut self) -> Result<(), Error>
If the results aren’t available yet, waits for an asynchronous background read to complete and then processes it.
This is useful for testing purposes to avoid busy-waiting, but to overlap I/O with other code it’s better to use Self::async_results.
Sourcepub fn run(&mut self) -> Result<(), Error>
pub fn run(&mut self) -> Result<(), Error>
Processes any asynchronous reads that have completed, and launches new ones.
Sourcepub fn is_done(&self) -> bool
pub fn is_done(&self) -> bool
Returns true if the results are available.
If results aren’t available yet, call Self::wait or Self::run.
Sourcepub fn results(
self,
factories: VecIndexedWSetFactories<K0, K1, A1>,
) -> VecIndexedWSet<K0, K1, A1>
pub fn results( self, factories: VecIndexedWSetFactories<K0, K1, A1>, ) -> VecIndexedWSet<K0, K1, A1>
Constructs and returns a VecIndexedWSet with the results.
§Panic
Panics if results aren’t available yet.
Auto Trait Implementations§
impl<'a, 'b, K0, A0, K1, A1> Freeze for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> !RefUnwindSafe for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> Send for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> Sync for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> Unpin for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
impl<'a, 'b, K0, A0, K1, A1> !UnwindSafe for FetchIndexedZSet<'a, 'b, K0, A0, K1, A1>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> 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>
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>
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