pub struct ServerConfig {
pub bind_addr: SocketAddr,
pub broadcast_addr: SocketAddr,
pub device_instance: u32,
pub device_name: String,
pub vendor_id: u16,
pub model_name: String,
pub max_apdu_length: u16,
pub max_cov_subscriptions: usize,
pub cov_check_interval: Duration,
pub shutdown_timeout: Duration,
}Expand description
Server configuration.
Fields§
§bind_addr: SocketAddrNetwork bind address.
broadcast_addr: SocketAddrBroadcast address.
device_instance: u32Device instance number.
device_name: StringDevice name.
vendor_id: u16Vendor ID.
model_name: StringModel name.
max_apdu_length: u16Maximum APDU length.
max_cov_subscriptions: usizeMaximum COV subscriptions.
cov_check_interval: DurationCOV check interval.
shutdown_timeout: DurationShutdown timeout.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn new(device_instance: u32) -> Self
pub fn new(device_instance: u32) -> Self
Create a new config with the specified device instance.
Sourcepub fn with_bind_addr(self, addr: SocketAddr) -> Self
pub fn with_bind_addr(self, addr: SocketAddr) -> Self
Set the bind address.
Sourcepub fn with_device_name(self, name: impl Into<String>) -> Self
pub fn with_device_name(self, name: impl Into<String>) -> Self
Set the device name.
Sourcepub fn with_vendor_id(self, vendor_id: u16) -> Self
pub fn with_vendor_id(self, vendor_id: u16) -> Self
Set the vendor ID.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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