pub struct MaterializedViewCache { /* private fields */ }Expand description
Cache for materialized views
Implementations§
Source§impl MaterializedViewCache
impl MaterializedViewCache
Sourcepub fn new() -> MaterializedViewCache
pub fn new() -> MaterializedViewCache
Create a new materialized view cache
Sourcepub fn register(&mut self, def: MaterializedViewDef)
pub fn register(&mut self, def: MaterializedViewDef)
Register a view definition
Sourcepub fn needs_refresh(&self, name: &str) -> bool
pub fn needs_refresh(&self, name: &str) -> bool
Check if view needs refresh
Sourcepub fn mark_stale(&mut self, table: &str)
pub fn mark_stale(&mut self, table: &str)
Mark views depending on a table as stale
Sourcepub fn due_for_refresh(&self) -> Vec<String>
pub fn due_for_refresh(&self) -> Vec<String>
Get views needing periodic refresh
Trait Implementations§
Source§impl Default for MaterializedViewCache
impl Default for MaterializedViewCache
Source§fn default() -> MaterializedViewCache
fn default() -> MaterializedViewCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MaterializedViewCache
impl RefUnwindSafe for MaterializedViewCache
impl Send for MaterializedViewCache
impl Sync for MaterializedViewCache
impl Unpin for MaterializedViewCache
impl UnsafeUnpin for MaterializedViewCache
impl UnwindSafe for MaterializedViewCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request