ReplaceStrategy

Enumin corefastly 0.13.1View source
pub enum ReplaceStrategy {
Immediate,
ImmediateForceMiss,
Wait,
}

Strategy to use to replace the existing object

Variants

Immediate

Immediately start the replace and do not wait for any other pending requests for the same object, including insert requests.

With this strategy a replace will race all other pending requests to update the object.

The existing object will be accessible until this replace finishes providing the replacement object.

This is the default replace strategy.

ImmediateForceMiss

Immediate, but remove the existing object immediately

Requests for the same object that arrive after this replace starts will wait until this replace starts providing the replacement object.

Wait

Join the wait list behind other pending requests before starting this request.

With this strategy this replace request will wait for an in-progress replace or insert request before starting.

This strategy allows implementing a counter, but may cause timeouts if too many requests are waiting for in-progress and waiting updates to complete.

Trait implementations

impl Clone for ReplaceStrategy

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for ReplaceStrategy

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Default for ReplaceStrategy

fn default() -> Self

Returns

Self

Auto trait implementations

Blanket implementations