pub struct CachingHelper { /* private fields */ }Expand description
Process-local credential cache, keyed on the full Query tuple.
Populated by Helper::approve and consulted on Helper::fill;
Helper::reject drops the corresponding entry. Lives for one
CLI invocation; a long-running daemon would want a TTL layered on
top.
Implementations§
Source§impl CachingHelper
impl CachingHelper
Trait Implementations§
Source§impl Debug for CachingHelper
impl Debug for CachingHelper
Source§impl Default for CachingHelper
impl Default for CachingHelper
Source§fn default() -> CachingHelper
fn default() -> CachingHelper
Returns the “default value” for a type. Read more
Source§impl Helper for CachingHelper
impl Helper for CachingHelper
Source§fn approve(&self, query: &Query, creds: &Credentials) -> Result<(), HelperError>
fn approve(&self, query: &Query, creds: &Credentials) -> Result<(), HelperError>
Cache the working credentials so the next request skips the helper chain entirely.
Source§fn reject(&self, query: &Query, _creds: &Credentials) -> Result<(), HelperError>
fn reject(&self, query: &Query, _creds: &Credentials) -> Result<(), HelperError>
Drop the cached entry — whatever’s in there clearly didn’t work.
Source§fn fill(&self, query: &Query) -> Result<Option<Credentials>, HelperError>
fn fill(&self, query: &Query) -> Result<Option<Credentials>, HelperError>
Try to fetch credentials for
query. Read moreAuto Trait Implementations§
impl !Freeze for CachingHelper
impl RefUnwindSafe for CachingHelper
impl Send for CachingHelper
impl Sync for CachingHelper
impl Unpin for CachingHelper
impl UnsafeUnpin for CachingHelper
impl UnwindSafe for CachingHelper
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