pub struct QueryEntityProfile {
pub query_name: String,
pub entity_type: Option<String>,
pub cardinality: QueryCardinality,
}Expand description
Entity profile extracted from a compiled query.
Describes which entities the query depends on and how many it returns.
Fields§
§query_name: StringName of the query
entity_type: Option<String>Entity type this query filters on (None if listing all entities)
Examples: “User”, “Post”, “Comment”
cardinality: QueryCardinalityExpected cardinality (number of entities returned)
Implementations§
Source§impl QueryEntityProfile
impl QueryEntityProfile
Sourcepub fn new(
query_name: String,
entity_type: Option<String>,
cardinality: QueryCardinality,
) -> Self
pub fn new( query_name: String, entity_type: Option<String>, cardinality: QueryCardinality, ) -> Self
Create a new query profile.
Sourcepub fn expected_hit_rate(&self) -> f64
pub fn expected_hit_rate(&self) -> f64
Expected cache hit rate for this query profile.
Trait Implementations§
Source§impl Clone for QueryEntityProfile
impl Clone for QueryEntityProfile
Source§fn clone(&self) -> QueryEntityProfile
fn clone(&self) -> QueryEntityProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryEntityProfile
impl Debug for QueryEntityProfile
Source§impl PartialEq for QueryEntityProfile
impl PartialEq for QueryEntityProfile
impl Eq for QueryEntityProfile
impl StructuralPartialEq for QueryEntityProfile
Auto Trait Implementations§
impl Freeze for QueryEntityProfile
impl RefUnwindSafe for QueryEntityProfile
impl Send for QueryEntityProfile
impl Sync for QueryEntityProfile
impl Unpin for QueryEntityProfile
impl UnsafeUnpin for QueryEntityProfile
impl UnwindSafe for QueryEntityProfile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.