avail_rust_client/subscription/
mod.rs

1//! Helpers for building block, extrinsic, and justification streaming subscriptions.
2
3pub mod block;
4pub mod extrinsic;
5pub mod justification;
6pub mod sub;
7
8pub use block::{BlockEventsSub, BlockHeaderSub, BlockSub, LegacyBlockSub};
9pub use extrinsic::{ExtrinsicSub, RawExtrinsicSub, TransactionSub};
10pub use justification::GrandpaJustificationSub;
11pub use sub::Sub;
12
13use crate::Client;
14
15/// Applies either the explicit override provided to a subscription or the client's global retry
16/// configuration.
17///
18/// Returns `true` when RPC calls should be retried, `false` otherwise.
19fn should_retry(client: &Client, value: Option<bool>) -> bool {
20	value.unwrap_or(client.is_global_retries_enabled())
21}