pub struct RouterOptions { /* private fields */ }Expand description
A router’s advertised name and optional discovery groups.
Implementations§
Source§impl RouterOptions
impl RouterOptions
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Replace the advertised routing-source name, preserving other settings.
Sourcepub fn clear_groups(self) -> Self
pub fn clear_groups(self) -> Self
Inherit discovery groups from the NDI configuration.
Sourcepub fn clear_config(self) -> Self
pub fn clear_config(self) -> Self
Remove the per-instance Advanced configuration override.
Sourcepub fn configured_name(&self) -> &str
pub fn configured_name(&self) -> &str
Requested advertised name.
Sourcepub fn configured_groups(&self) -> Option<&[String]>
pub fn configured_groups(&self) -> Option<&[String]>
Requested discovery groups, or None to inherit the NDI configuration.
Sourcepub fn configured_config(&self) -> Option<&AdvancedConfig>
pub fn configured_config(&self) -> Option<&AdvancedConfig>
The stored Advanced configuration handle, if any.
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Configure a named routing source. Creating the Router advertises it.
Sourcepub fn groups(self, groups: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn groups(self, groups: impl IntoIterator<Item = impl Into<String>>) -> Self
Set a non-empty list of discovery groups the router is advertised in,
replacing the NDI configuration. Use Self::clear_groups to inherit
the configuration. Creation refuses empty elements and elements
containing a comma or NUL.
Sourcepub fn config(self, config: AdvancedConfig) -> Self
pub fn config(self, config: AdvancedConfig) -> Self
Create the router with this per-instance Advanced SDK configuration, which it keeps for as long as it lives.
Router::new then needs an Advanced runtime, and a build with the
Advanced SDK.