Enum pliantdb_core::connection::AccessPolicy [−][src]
pub enum AccessPolicy { UpdateBefore, UpdateAfter, NoUpdate, }
Expand description
Changes how the view’s outdated data will be treated.
Variants
Update any changed documents before returning a response.
Return the results, which may be out-of-date, and start an update job in the background. This pattern is useful when you want to ensure you provide consistent response times while ensuring the database is updating in the background.
Returns the restuls, which may be out-of-date, and do not start any
background jobs. This mode is useful if you’re using a view as a cache
and have a background process that is responsible for controlling when
data is refreshed and updated. While the default UpdateBefore
shouldn’t have much overhead, this option removes all overhead related
to view updating from the query.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for AccessPolicy
impl Send for AccessPolicy
impl Sync for AccessPolicy
impl Unpin for AccessPolicy
impl UnwindSafe for AccessPolicy
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self