#[non_exhaustive]pub struct BackendServerConfig {
pub host: Option<String>,
pub port: Option<u16>,
pub admin_name: Option<Arc<str>>,
pub tango_host: Option<(Arc<str>, u16)>,
}Expand description
How a backend serves, see Backend::serve, whatever is not given being left to the
backend, which is what the default configuration is.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.host: Option<String>The host to listen at, an address or a name of this machine, every one of its interfaces if none is given.
port: Option<u16>The port to listen at, one the system picks if none is given, which is what a Tango device server does: its clients find it through the database, where it is exported. A fixed port is what a server without a database needs, its clients having nothing else to find it by.
admin_name: Option<Arc<str>>The name of the admin device of the server being served, dserver/exe/inst, which
names the event channel of the server: a backend not given one publishes no event.
tango_host: Option<(Arc<str>, u16)>The host and port of the database the server is registered in, which prefixes the names of its events. A server without a database prefixes them with its own host and port instead, marking them as such.
Implementations§
Source§impl BackendServerConfig
impl BackendServerConfig
Sourcepub fn with_host(self, host: &str) -> Self
pub fn with_host(self, host: &str) -> Self
Listen at that host, see Self::host.
Sourcepub fn with_port(self, port: u16) -> Self
pub fn with_port(self, port: u16) -> Self
Listen at that port, see Self::port.
Sourcepub fn with_admin_name(self, admin_name: impl Into<Arc<str>>) -> Self
pub fn with_admin_name(self, admin_name: impl Into<Arc<str>>) -> Self
Serve the server of that admin device, see Self::admin_name.
Sourcepub fn with_tango_host(self, host: impl Into<Arc<str>>, port: u16) -> Self
pub fn with_tango_host(self, host: impl Into<Arc<str>>, port: u16) -> Self
Serve a server registered in the database at that host and port, see
Self::tango_host.