pub struct Idempotency { /* private fields */ }Expand description
Replay cached successful responses for the same Idempotency-Key.
Implementations§
Source§impl Idempotency
impl Idempotency
pub fn from_store(store: Arc<dyn KvStore>) -> Self
pub fn ttl(self, ttl: Duration) -> Self
pub fn max_body(self, bytes: usize) -> Self
pub fn prefix(self, prefix: impl Into<String>) -> Self
Sourcepub fn middleware(self) -> MwEntry
pub fn middleware(self) -> MwEntry
Route / mount middleware (same as plugin install).
Trait Implementations§
Source§impl Plugin for Idempotency
impl Plugin for Idempotency
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl !RefUnwindSafe for Idempotency
impl !UnwindSafe for Idempotency
impl Freeze for Idempotency
impl Send for Idempotency
impl Sync for Idempotency
impl Unpin for Idempotency
impl UnsafeUnpin for Idempotency
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