pub struct QueryExecutionResourceLimits {
pub timeout_milliseconds: u64,
pub items: u64,
pub bytes: u64,
pub graph_nodes: u64,
pub attribute_values: u64,
pub collection_members: u64,
pub role_players: u64,
pub statements: u32,
}Expand description
The answer policy of one query terminal, the same on every transport.
items bounds provider evidence and public rows, bytes bounds
provider/reply bytes and projected payload bytes, graph_nodes includes
top-level things and nested role players, attribute_values includes
hydrated and projected scalars, and collection_members includes collected
identities plus group keys and reducer cells. role_players counts
role-player references independently of their graph nodes. statements is
enforced before each provider call. No field is accepted and ignored on
either lane.
Self::default_for is the policy a session starts from on its
transport, and Default is the direct one. A caller may tighten
any dimension, and may raise one by configuring it explicitly; only the
timeout and the statement count have a supported maximum. A session never
widens the policy of the connection it runs on
(Self::constrained_by).
Fields§
§timeout_milliseconds: u64Execution timeout in milliseconds.
items: u64Provider/result item ceiling.
bytes: u64Provider/reply/projected byte ceiling.
graph_nodes: u64Hydrated/projected graph-node ceiling.
attribute_values: u64Hydrated/projected attribute-value ceiling.
collection_members: u64Collection-member and reduction-cell ceiling.
role_players: u64Role-player reference ceiling.
statements: u32Provider statement ceiling.
Implementations§
Source§impl QueryExecutionResourceLimits
impl QueryExecutionResourceLimits
Sourcepub const NAMES: [&'static str; 8]
pub const NAMES: [&'static str; 8]
The policy dimensions by their stable public names, in declaration order.
Sourcepub const fn default_for(
transport: AnswerTransport,
) -> QueryExecutionResourceLimits
pub const fn default_for( transport: AnswerTransport, ) -> QueryExecutionResourceLimits
The policy in force on transport when nothing was configured.
This is the one place an unset policy becomes a default.
Sourcepub fn from_overrides<'name>(
transport: AnswerTransport,
overrides: impl IntoIterator<Item = (&'name str, u64)>,
) -> Result<QueryExecutionResourceLimits, QueryExecutionLimitsError>
pub fn from_overrides<'name>( transport: AnswerTransport, overrides: impl IntoIterator<Item = (&'name str, u64)>, ) -> Result<QueryExecutionResourceLimits, QueryExecutionLimitsError>
Build a policy from named dimensions; an unnamed one keeps its
transport default. An unknown name or a value past its maximum is
refused.
Sourcepub fn overrides(self) -> BTreeMap<String, u64>
pub fn overrides(self) -> BTreeMap<String, u64>
The dimensions that differ from the proxy (wire) defaults, by stable
name: the form an executor advertises. A server’s ceilings are read
back with Self::from_overrides on AnswerTransport::Proxy.
Sourcepub const fn tightened(
timeout_milliseconds: u64,
items: u64,
bytes: u64,
graph_nodes: u64,
attribute_values: u64,
collection_members: u64,
role_players: u64,
statements: u32,
) -> QueryExecutionResourceLimits
pub const fn tightened( timeout_milliseconds: u64, items: u64, bytes: u64, graph_nodes: u64, attribute_values: u64, collection_members: u64, role_players: u64, statements: u32, ) -> QueryExecutionResourceLimits
Construct a policy no looser than the direct default, the loosest default, in any dimension.
Sourcepub const fn validate(
self,
) -> Result<QueryExecutionResourceLimits, QueryExecutionLimitOutOfRange>
pub const fn validate( self, ) -> Result<QueryExecutionResourceLimits, QueryExecutionLimitOutOfRange>
Check a configured policy against the supported maxima.
A value above its maximum is refused by name, never clamped: a caller who asked for more must not silently get less.
Sourcepub fn refusal_details(
self,
transport: AnswerTransport,
code: &str,
) -> Option<(&'static str, u64, &'static str)>
pub fn refusal_details( self, transport: AnswerTransport, code: &str, ) -> Option<(&'static str, u64, &'static str)>
Describe the ceiling behind one resource-limit refusal.
Returns the dimension’s stable name, the value in force, and whether
that value is transport’s default or one the caller configured.
None for a code that reports no policy dimension.
Trait Implementations§
Source§impl Clone for QueryExecutionResourceLimits
impl Clone for QueryExecutionResourceLimits
Source§fn clone(&self) -> QueryExecutionResourceLimits
fn clone(&self) -> QueryExecutionResourceLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for QueryExecutionResourceLimits
Source§impl Debug for QueryExecutionResourceLimits
impl Debug for QueryExecutionResourceLimits
Source§impl Default for QueryExecutionResourceLimits
impl Default for QueryExecutionResourceLimits
Source§fn default() -> QueryExecutionResourceLimits
fn default() -> QueryExecutionResourceLimits
The direct-session default, Self::default_for on
AnswerTransport::Direct.
impl Eq for QueryExecutionResourceLimits
Source§impl From<QueryExecutionResourceLimits> for RemoteQueryLimits
impl From<QueryExecutionResourceLimits> for RemoteQueryLimits
Source§fn from(resources: QueryExecutionResourceLimits) -> Self
fn from(resources: QueryExecutionResourceLimits) -> Self
Source§impl From<RemoteQueryLimits> for QueryExecutionResourceLimits
impl From<RemoteQueryLimits> for QueryExecutionResourceLimits
Source§fn from(limits: RemoteQueryLimits) -> Self
fn from(limits: RemoteQueryLimits) -> Self
impl StructuralPartialEq for QueryExecutionResourceLimits
Auto Trait Implementations§
impl Freeze for QueryExecutionResourceLimits
impl RefUnwindSafe for QueryExecutionResourceLimits
impl Send for QueryExecutionResourceLimits
impl Sync for QueryExecutionResourceLimits
impl Unpin for QueryExecutionResourceLimits
impl UnsafeUnpin for QueryExecutionResourceLimits
impl UnwindSafe for QueryExecutionResourceLimits
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
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
key and return true if they are equal.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
key and return true if they are equal.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> ⓘ
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> ⓘ
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>
T in a tonic::Request