pub struct CachePeekStaleService { /* private fields */ }Expand description
Outcome-aware segment that serves a stale (post-expiry) cache entry.
Evaluates key_expr:
None→Stopped(exchange)(no key = no stale available).Some(key)→repository.peek_stale(&key).await.Err(e)→Failed(e).Ok(Some(entry))→ reconstruct body from entry, set on exchange, returnCompleted(exchange).Ok(None)→Stopped(exchange)(absence = no stale available — spec R6).
Implementations§
Source§impl CachePeekStaleService
impl CachePeekStaleService
pub fn new( repository: Arc<dyn CacheRepository>, key_expr: MessageIdExpression, ) -> Self
Trait Implementations§
Source§impl Clone for CachePeekStaleService
impl Clone for CachePeekStaleService
Source§impl OutcomePipeline for CachePeekStaleService
impl OutcomePipeline for CachePeekStaleService
Source§fn clone_box(&self) -> Box<dyn OutcomePipeline>
fn clone_box(&self) -> Box<dyn OutcomePipeline>
Clone the segment into a new boxed instance. Required because
Box<dyn OutcomePipeline> cannot directly derive Clone.Auto Trait Implementations§
impl !RefUnwindSafe for CachePeekStaleService
impl !UnwindSafe for CachePeekStaleService
impl Freeze for CachePeekStaleService
impl Send for CachePeekStaleService
impl Sync for CachePeekStaleService
impl Unpin for CachePeekStaleService
impl UnsafeUnpin for CachePeekStaleService
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