Config

Struct 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§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Config

Define the default values for an STTP connection Config.

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.