pub struct StreamConfig {Show 14 fields
pub column_mapping: Option<ColumnMapping>,
pub event_signature: Option<String>,
pub hex_output: HexOutput,
pub batch_size: u64,
pub max_batch_size: u64,
pub min_batch_size: u64,
pub concurrency: usize,
pub max_num_blocks: Option<usize>,
pub max_num_transactions: Option<usize>,
pub max_num_logs: Option<usize>,
pub max_num_traces: Option<usize>,
pub response_bytes_ceiling: u64,
pub response_bytes_floor: u64,
pub reverse: bool,
}Expand description
Config for hypersync event streaming.
Fields§
§column_mapping: Option<ColumnMapping>Column mapping for stream function output. It lets you map columns you want into the DataTypes you want.
event_signature: Option<String>Event signature used to populate decode logs. Decode logs would be empty if set to None.
hex_output: HexOutputDetermines formatting of binary columns numbers into utf8 hex.
batch_size: u64Initial batch size. Size would be adjusted based on response size during execution.
max_batch_size: u64Maximum batch size that could be used during dynamic adjustment.
min_batch_size: u64Minimum batch size that could be used during dynamic adjustment.
concurrency: usizeNumber of async threads that would be spawned to execute different block ranges of queries.
max_num_blocks: Option<usize>Max number of blocks to fetch in a single request.
max_num_transactions: Option<usize>Max number of transactions to fetch in a single request.
max_num_logs: Option<usize>Max number of logs to fetch in a single request.
max_num_traces: Option<usize>Max number of traces to fetch in a single request.
response_bytes_ceiling: u64Size of a response in bytes from which step size will be lowered
response_bytes_floor: u64Size of a response in bytes from which step size will be increased
reverse: boolStream data in reverse order
Implementations§
Source§impl StreamConfig
impl StreamConfig
Sourcepub const fn default_concurrency() -> usize
pub const fn default_concurrency() -> usize
Default concurrency for stream processing
Sourcepub const fn default_batch_size() -> u64
pub const fn default_batch_size() -> u64
Default initial batch size
Sourcepub const fn default_max_batch_size() -> u64
pub const fn default_max_batch_size() -> u64
Default maximum batch size
Sourcepub const fn default_min_batch_size() -> u64
pub const fn default_min_batch_size() -> u64
Default minimum batch size
Sourcepub const fn default_response_bytes_ceiling() -> u64
pub const fn default_response_bytes_ceiling() -> u64
Default response bytes ceiling for dynamic batch adjustment
Sourcepub const fn default_response_bytes_floor() -> u64
pub const fn default_response_bytes_floor() -> u64
Default response bytes floor for dynamic batch adjustment
Sourcepub const fn default_reverse() -> bool
pub const fn default_reverse() -> bool
Default reverse streaming setting
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamConfig
impl Debug for StreamConfig
Source§impl Default for StreamConfig
impl Default for StreamConfig
Source§impl<'de> Deserialize<'de> for StreamConfig
impl<'de> Deserialize<'de> for StreamConfig
Source§fn 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>,
Source§impl JsonSchema for StreamConfig
impl JsonSchema for StreamConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnwindSafe for StreamConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more