Struct sttp::Config

source ·
pub struct Config {
    pub max_retries: i32,
    pub retry_interval: i32,
    pub max_retry_interval: i32,
    pub auto_reconnect: bool,
    pub auto_request_metadata: bool,
    pub auto_subscribe: bool,
    pub compress_payload_data: bool,
    pub compress_metadata: bool,
    pub compress_signal_index_cache: bool,
    pub metadata_filters: String,
    pub version: u8,
}
Expand description

Defines STTP connection related configuration parameters.

Fields§

§max_retries: i32

Defines the maximum number of times to retry a connection. Set value to -1 to retry infinitely. Note: setting ignored for listening connections.

§retry_interval: i32

Defines the base retry interval, in milliseconds. Retries will exponentially back-off starting from this interval. Note: setting ignored for listening connections.

§max_retry_interval: i32

Defines the maximum retry interval, in milliseconds. Note: setting ignored for listening connections.

§auto_reconnect: bool

Defines flag that determines if connections should be automatically reattempted. Note: setting ignored for listening connections.

§auto_request_metadata: bool

Defines the flag that determines if metadata should be automatically requested upon successful connection. When true, metadata will be requested upon connection before subscription; otherwise, any metadata operations must be handled manually.

§auto_subscribe: bool

Defines the flag that determines if subscription should be handled automatically upon successful connection. When AutoRequestMetadata is true and AutoSubscribe is true, subscription will occur after reception of metadata. When AutoRequestMetadata is false and AutoSubscribe is true, subscription will occur at successful connection. When AutoSubscribe is false, any subscribe operations must be handled manually.

§compress_payload_data: bool

Determines whether payload data is compressed.

§compress_metadata: bool

Determines whether the metadata transfer is compressed.

§compress_signal_index_cache: bool

Determines whether the signal index cache is compressed.

§metadata_filters: String

Defines any filters to be applied to incoming metadata to reduce total received metadata. Each filter expression should be separated by semi-colon.

§version: u8

Defines the target STTP protocol version. This currently defaults to 2.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Define the default values for an STTP connection Config.

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.