pub struct PluginBudget { /* private fields */ }Expand description
Immutable invocation limits enforced by crate::PluginContext.
Implementations§
Source§impl PluginBudget
impl PluginBudget
Sourcepub fn with_max_input_bytes(self, value: usize) -> Result<Self, PluginError>
pub fn with_max_input_bytes(self, value: usize) -> Result<Self, PluginError>
Sets the input-byte ceiling. Zero allows only empty input.
Sourcepub fn with_max_requests(self, value: u64) -> Result<Self, PluginError>
pub fn with_max_requests(self, value: u64) -> Result<Self, PluginError>
Sets the request ceiling. Zero grants no transport authority.
Sourcepub fn with_request_timeout(self, value: Duration) -> Result<Self, PluginError>
pub fn with_request_timeout(self, value: Duration) -> Result<Self, PluginError>
Sets the per-request timeout. Zero denies request dispatch.
Sourcepub fn with_max_wall_time(self, value: Duration) -> Result<Self, PluginError>
pub fn with_max_wall_time(self, value: Duration) -> Result<Self, PluginError>
Sets the invocation wall budget. Zero denies plugin execution.
Sourcepub fn with_max_response_body_bytes(
self,
value: u64,
) -> Result<Self, PluginError>
pub fn with_max_response_body_bytes( self, value: u64, ) -> Result<Self, PluginError>
Sets the delivered-body ceiling for one response.
Sourcepub fn with_max_cumulative_body_bytes(
self,
value: u64,
) -> Result<Self, PluginError>
pub fn with_max_cumulative_body_bytes( self, value: u64, ) -> Result<Self, PluginError>
Sets the invocation-wide delivered response body ceiling.
Sourcepub fn with_max_observations(self, value: u64) -> Result<Self, PluginError>
pub fn with_max_observations(self, value: u64) -> Result<Self, PluginError>
Sets the maximum number of recorded observations.
Sourcepub fn with_max_observation_bytes(self, value: u64) -> Result<Self, PluginError>
pub fn with_max_observation_bytes(self, value: u64) -> Result<Self, PluginError>
Sets the aggregate raw observation-value byte ceiling.
Sourcepub const fn max_input_bytes(&self) -> usize
pub const fn max_input_bytes(&self) -> usize
Maximum input bytes.
Sourcepub const fn max_requests(&self) -> u64
pub const fn max_requests(&self) -> u64
Maximum broker dispatches.
Sourcepub const fn request_timeout(&self) -> Duration
pub const fn request_timeout(&self) -> Duration
Per-request timeout.
Sourcepub const fn max_wall_time(&self) -> Duration
pub const fn max_wall_time(&self) -> Duration
Invocation wall budget.
Sourcepub const fn max_response_body_bytes(&self) -> u64
pub const fn max_response_body_bytes(&self) -> u64
Maximum delivered bytes for one response.
Sourcepub const fn max_cumulative_body_bytes(&self) -> u64
pub const fn max_cumulative_body_bytes(&self) -> u64
Maximum invocation-wide delivered response bytes.
Sourcepub const fn max_observations(&self) -> u64
pub const fn max_observations(&self) -> u64
Maximum observation count.
Sourcepub const fn max_observation_bytes(&self) -> u64
pub const fn max_observation_bytes(&self) -> u64
Maximum raw observation-value bytes.
Trait Implementations§
Source§impl Clone for PluginBudget
impl Clone for PluginBudget
Source§fn clone(&self) -> PluginBudget
fn clone(&self) -> PluginBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginBudget
impl Debug for PluginBudget
Source§impl Default for PluginBudget
impl Default for PluginBudget
impl Eq for PluginBudget
Source§impl PartialEq for PluginBudget
impl PartialEq for PluginBudget
Source§impl Serialize for PluginBudget
impl Serialize for PluginBudget
impl StructuralPartialEq for PluginBudget
Auto Trait Implementations§
impl Freeze for PluginBudget
impl RefUnwindSafe for PluginBudget
impl Send for PluginBudget
impl Sync for PluginBudget
impl Unpin for PluginBudget
impl UnsafeUnpin for PluginBudget
impl UnwindSafe for PluginBudget
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.