pub struct RuntimeConfig {
pub bind: IpAddr,
pub middleman_port: u16,
pub register_port: u16,
pub heartbeat_ms: u32,
pub stale_after_ms: u64,
}Expand description
Validated runtime view consumed by run(). Constructed by the binary
from a WakeServerConfig plus the top-level bind_addr.
Fields§
§bind: IpAddr§middleman_port: u16§register_port: u16§heartbeat_ms: u32§stale_after_ms: u64Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn from_block(
block: &WakeServerConfig,
bind: IpAddr,
) -> Result<Self, String>
pub fn from_block( block: &WakeServerConfig, bind: IpAddr, ) -> Result<Self, String>
Build a runtime config from a parsed [wake_server] block plus a
resolved bind IP. Returns Err(_) with a human-readable message on
validation failure.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
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 moreAuto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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