pub struct DecisionCache { /* private fields */ }Expand description
Per-session memory of granted/denied (cap_id, key) decisions.
Implementations§
Source§impl DecisionCache
impl DecisionCache
pub fn new() -> Self
Sourcepub async fn decide_cached(
&self,
prompter: &dyn ConsentPrompter,
ask: ConsentAsk,
) -> bool
pub async fn decide_cached( &self, prompter: &dyn ConsentPrompter, ask: ConsentAsk, ) -> bool
Return the remembered decision for (cap_id, key), or prompt once via
prompter, store, and return it.
Trait Implementations§
Source§impl Default for DecisionCache
impl Default for DecisionCache
Source§fn default() -> DecisionCache
fn default() -> DecisionCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DecisionCache
impl RefUnwindSafe for DecisionCache
impl Send for DecisionCache
impl Sync for DecisionCache
impl Unpin for DecisionCache
impl UnsafeUnpin for DecisionCache
impl UnwindSafe for DecisionCache
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