[][src]Struct exonum_node::MemoryPoolConfig

#[non_exhaustive]pub struct MemoryPoolConfig {
    pub events_pool_capacity: EventsPoolCapacity,
    pub flush_pool_strategy: FlushPoolStrategy,
}

Memory pool configuration parameters.

Examples

For most applications, you should use the value returned by MemoryPoolConfig::default(), maybe overwriting some fields afterwards:

let mut pool_config = MemoryPoolConfig::default();
// Increase flush pool interval to 100 milliseconds.
pool_config.flush_pool_strategy = FlushPoolStrategy::Timeout {
    timeout: 100,
};
// Use the config somewhere...

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
events_pool_capacity: EventsPoolCapacity

Sets the maximum number of messages that can be buffered on the event loop's notification channel before a send will fail.

flush_pool_strategy: FlushPoolStrategy

Interval in milliseconds between flushing the transaction cache to the persistent pool.

This value influences how fast transactions appear in the persistent pool after they have been initially processed by the node. With Never setting, transactions will not be persisted at all before appearing in a block, which may negatively influence some applications (e.g., the GET transactions endpoint of the explorer service). On the other hand of the spectrum, there is Immediate, which flushes each transaction separately after its initial processing. In the middle, there is Timeout, which allows to specify the coherence interval for the pool.

Trait Implementations

impl Clone for MemoryPoolConfig[src]

impl Debug for MemoryPoolConfig[src]

impl Default for MemoryPoolConfig[src]

impl<'de> Deserialize<'de> for MemoryPoolConfig[src]

impl PartialEq<MemoryPoolConfig> for MemoryPoolConfig[src]

impl Serialize for MemoryPoolConfig[src]

impl StructuralPartialEq for MemoryPoolConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,