pub struct NodeCacheDaemon<L: LocalCacheStore> { /* private fields */ }Expand description
The daemon’s request-handling core. Generic over the local store so
tests can inject crate::store::MockLocalCacheStore and
production wires crate::store::RealLocalCacheStore; the remote
tier is always the existing dyn StorageBackend trait object,
reused unmodified from sui-cache.
Implementations§
Source§impl<L: LocalCacheStore + 'static> NodeCacheDaemon<L>
impl<L: LocalCacheStore + 'static> NodeCacheDaemon<L>
pub fn new(local: Arc<L>, remote: Arc<dyn StorageBackend>) -> Self
Sourcepub async fn handle_request(&self, request: DaemonRequest) -> DaemonResponse
pub async fn handle_request(&self, request: DaemonRequest) -> DaemonResponse
Answer one request. Never panics: every fallible path is
surfaced as DaemonResponse::Error, not an unwind.
Auto Trait Implementations§
impl<L> !RefUnwindSafe for NodeCacheDaemon<L>
impl<L> !UnwindSafe for NodeCacheDaemon<L>
impl<L> Freeze for NodeCacheDaemon<L>
impl<L> Send for NodeCacheDaemon<L>
impl<L> Sync for NodeCacheDaemon<L>
impl<L> Unpin for NodeCacheDaemon<L>
impl<L> UnsafeUnpin for NodeCacheDaemon<L>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more