pub struct LocalRetriever(/* private fields */);Expand description
Durable node retriever - retrieves everything locally from storage
Implementations§
Source§impl LocalRetriever
impl LocalRetriever
pub fn new(collection: StorageCollectionWrapper) -> Self
pub async fn store_used_events(&mut self) -> Result<(), RetrievalError>
Trait Implementations§
Source§impl Clone for LocalRetriever
impl Clone for LocalRetriever
Source§fn clone(&self) -> LocalRetriever
fn clone(&self) -> LocalRetriever
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl GetEvents for LocalRetriever
impl GetEvents for LocalRetriever
type Id = EventId
type Event = Event
Source§fn retrieve_event<'life0, 'async_trait>(
&'life0 self,
event_ids: Vec<Self::Id>,
) -> Pin<Box<dyn Future<Output = Result<(usize, Vec<Attested<Self::Event>>), RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retrieve_event<'life0, 'async_trait>(
&'life0 self,
event_ids: Vec<Self::Id>,
) -> Pin<Box<dyn Future<Output = Result<(usize, Vec<Attested<Self::Event>>), RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
retrieve the events from the store OR the remote peer
Source§fn stage_events(&self, events: impl IntoIterator<Item = Attested<Self::Event>>)
fn stage_events(&self, events: impl IntoIterator<Item = Attested<Self::Event>>)
Stage events for immediate retrieval without storage. Used when applying EventBridge deltas.
Staged events are available for lineage comparison at zero budget cost before being persisted.
Source§fn mark_event_used(&self, event_id: &Self::Id)
fn mark_event_used(&self, event_id: &Self::Id)
Mark an event as used. Used when applying EventBridge deltas.
Source§fn estimate_cost(&self, _batch_size: usize) -> usize
fn estimate_cost(&self, _batch_size: usize) -> usize
Estimate the budget cost for retrieving a batch of events
This allows different implementations to model their cost structure
Auto Trait Implementations§
impl Freeze for LocalRetriever
impl !RefUnwindSafe for LocalRetriever
impl Send for LocalRetriever
impl Sync for LocalRetriever
impl Unpin for LocalRetriever
impl UnsafeUnpin for LocalRetriever
impl !UnwindSafe for LocalRetriever
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<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>
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 moreSource§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.