pub struct ProjectRuntimeConfig { /* private fields */ }Expand description
Runtime policy for one private project actor.
The binary parses this once at server startup and passes it into the broker. Tests and embedders can construct the default directly without rereading process environment during project open.
Implementations§
Source§impl ProjectRuntimeConfig
impl ProjectRuntimeConfig
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Parse runtime env vars once at server startup.
§Errors
ServerError::Internal when a runtime env var is malformed, zero
where zero is unsafe.
Sourcepub fn from_env_with_file(file: &RuntimeFileConfig) -> Result<Self>
pub fn from_env_with_file(file: &RuntimeFileConfig) -> Result<Self>
Resolve the runtime policy with a config-file section as the layer
beneath env vars: each knob is env var > file > built-in default.
§Errors
ServerError::Internal when an env var is malformed, or a resolved
value (from env or file) is zero where zero is unsafe, or the RSS
ceilings violate import_switch <= post_job <= hard_kill.
pub const fn worker_rss_post_job_restart_kib(&self) -> u64
pub const fn worker_rss_hard_kill_kib(&self) -> u64
pub const fn worker_rss_sample_millis(&self) -> u64
pub const fn import_switch_rss_soft_kib(&self) -> u64
pub const fn module_cache_rss_guard_kib(&self) -> u64
pub const fn module_cache_max_bytes(&self) -> u64
pub const fn request_timeout_millis(&self) -> u64
pub const fn mailbox_capacity(&self) -> usize
pub const fn max_restarts_per_window(&self) -> usize
pub const fn restart_window(&self) -> Duration
Trait Implementations§
Source§impl Clone for ProjectRuntimeConfig
impl Clone for ProjectRuntimeConfig
Source§fn clone(&self) -> ProjectRuntimeConfig
fn clone(&self) -> ProjectRuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProjectRuntimeConfig
impl Debug for ProjectRuntimeConfig
Source§impl Default for ProjectRuntimeConfig
impl Default for ProjectRuntimeConfig
impl Eq for ProjectRuntimeConfig
Source§impl PartialEq for ProjectRuntimeConfig
impl PartialEq for ProjectRuntimeConfig
Source§fn eq(&self, other: &ProjectRuntimeConfig) -> bool
fn eq(&self, other: &ProjectRuntimeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProjectRuntimeConfig
Auto Trait Implementations§
impl Freeze for ProjectRuntimeConfig
impl RefUnwindSafe for ProjectRuntimeConfig
impl Send for ProjectRuntimeConfig
impl Sync for ProjectRuntimeConfig
impl Unpin for ProjectRuntimeConfig
impl UnsafeUnpin for ProjectRuntimeConfig
impl UnwindSafe for ProjectRuntimeConfig
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.