pub struct RouterConfig { /* private fields */ }Implementations§
Source§impl RouterConfig
impl RouterConfig
Sourcepub fn default_e2e_encryption_mode() -> RouterE2eEncryptionMode
pub fn default_e2e_encryption_mode() -> RouterE2eEncryptionMode
Default router E2E mode for this build.
Builds with cryptography prefer encrypted payloads automatically for data types that request
it. Minimal builds without cryptography stay disabled and reject RequireOn traffic.
Sourcepub fn new<H>(handlers: H) -> Self
pub fn new<H>(handlers: H) -> Self
Create a new router configuration with the specified local endpoint handlers.
Sourcepub fn with_reliable_enabled(self, enabled: bool) -> Self
pub fn with_reliable_enabled(self, enabled: bool) -> Self
Enable or disable reliable delivery for this router instance.
Sourcepub fn with_sender<S: AsRef<str>>(self, sender: S) -> Self
pub fn with_sender<S: AsRef<str>>(self, sender: S) -> Self
Override the sender identifier for this router instance.
Sourcepub fn with_hostname<S: AsRef<str>>(self, hostname: S) -> Self
pub fn with_hostname<S: AsRef<str>>(self, hostname: S) -> Self
Alias for with_sender; discovery uses this name for P2P service resolution.
Sourcepub fn with_dynamic_address(self) -> Self
pub fn with_dynamic_address(self) -> Self
Request a dynamic address assigned by the discovered network authority.
Sourcepub fn with_requested_address(self, address: NodeAddress) -> Self
pub fn with_requested_address(self, address: NodeAddress) -> Self
Request a preferred address. It is kept when unique and reassigned on conflict.
Sourcepub fn with_static_address(self, address: NodeAddress) -> Self
pub fn with_static_address(self, address: NodeAddress) -> Self
Require a static address. If two static nodes conflict, the oldest keeps it.
Sourcepub fn on_address_change<F>(self, f: F) -> Self
pub fn on_address_change<F>(self, f: F) -> Self
Register a callback for local address or hostname changes after conflict resolution.
Sourcepub fn with_e2e_encryption(self, mode: RouterE2eEncryptionMode) -> Self
pub fn with_e2e_encryption(self, mode: RouterE2eEncryptionMode) -> Self
Configure this router’s end-to-end cryptography policy.
Sourcepub fn with_e2e_key_id(self, key_id: u32) -> Self
pub fn with_e2e_key_id(self, key_id: u32) -> Self
Configure the application-defined key id used for E2E encrypted payloads.
Sourcepub fn with_timesync(self, cfg: TimeSyncConfig) -> Self
pub fn with_timesync(self, cfg: TimeSyncConfig) -> Self
Enables and configures built-in time synchronization for this router.
Trait Implementations§
Source§impl Clone for RouterConfig
impl Clone for RouterConfig
Source§fn clone(&self) -> RouterConfig
fn clone(&self) -> RouterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more