pub struct MaterializedView {
pub query_hash: String,
pub query_pattern: String,
pub result_size: usize,
pub created_at: Instant,
pub last_accessed: Instant,
pub ttl: Duration,
pub access_count: u64,
pub data: ViewData,
pub dependent_predicates: Vec<String>,
}Expand description
A single materialized view entry
Fields§
§query_hash: StringHash of the query pattern that produced this view
query_pattern: StringTextual representation of the source query pattern
result_size: usizeNumber of result rows
created_at: InstantWhen the view was first created
last_accessed: InstantWhen the view was last accessed (for LRU eviction)
ttl: DurationTime-to-live for this view
access_count: u64How many times this view has been accessed (hit count)
data: ViewDataThe actual data
dependent_predicates: Vec<String>Set of predicate IRIs that this view depends on (for targeted invalidation)
Implementations§
Source§impl MaterializedView
impl MaterializedView
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true if the view’s TTL has elapsed
Sourcepub fn in_memory_rows(&self) -> Option<&[BindingRow]>
pub fn in_memory_rows(&self) -> Option<&[BindingRow]>
Returns the in-memory rows if available
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MaterializedView
impl RefUnwindSafe for MaterializedView
impl Send for MaterializedView
impl Sync for MaterializedView
impl Unpin for MaterializedView
impl UnsafeUnpin for MaterializedView
impl UnwindSafe for MaterializedView
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.