Struct comms_service::CommsConfig
source · [−]pub struct CommsConfig {
pub max_num_handlers: Option<u16>,
pub downlink_ports: Option<Vec<u16>>,
pub timeout: Option<u64>,
pub ip: String,
}
Expand description
A struct that holds useful configuration options to use in a comms-service
implementation.
Created by parsing a configuration file in the toml
file format.
Fields
max_num_handlers: Option<u16>
The maximum number of concurrent message handlers allowed Default: 50
downlink_ports: Option<Vec<u16>>
Optional list of ports used by downlink endpoints that send messages to the ground. Each port in the list will be used by one downlink endpoint.
timeout: Option<u64>
Timeout for the completion of GraphQL operations within message handlers (in milliseconds). Default: 1500
ip: String
Required. IP address on which comms service will listen.
Implementations
sourceimpl CommsConfig
impl CommsConfig
sourcepub fn new(service_config: Config) -> CommsResult<Self>
pub fn new(service_config: Config) -> CommsResult<Self>
Builds a new configuration for a specific comms-service
.
Configuration parameters are read from the service’s config.toml
file.
Trait Implementations
sourceimpl Clone for CommsConfig
impl Clone for CommsConfig
sourcefn clone(&self) -> CommsConfig
fn clone(&self) -> CommsConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CommsConfig
impl Debug for CommsConfig
sourceimpl<'de> Deserialize<'de> for CommsConfig
impl<'de> Deserialize<'de> for CommsConfig
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CommsConfig
impl Send for CommsConfig
impl Sync for CommsConfig
impl Unpin for CommsConfig
impl UnwindSafe for CommsConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more