helpers.rs

Overview

This file provides utility functions and trait implementations primarily for type conversions, formatting large integers, logging initialization, and parsing custom data structures. It facilitates data transformation and formatting related to numeric types and blockchain-specific data representations within the application. The utilities help bridge raw data formats with application-friendly types and representations, supporting consistent handling and display of numeric and currency data.


Traits and Their Implementations

ToBool Trait

ToInt Trait

ToOptU64 Trait

ToFloat Trait


Functions

format_big_int

format_big_int_dec

u64_to_string

init_tracing

ecc_from_bytes

query_order_by_str


Test Module


Important Implementation Details


Interactions with Other System Components


Mermaid Diagram

flowchart TD
A[Traits] -->|ToBool| B[Option<i64> to Option<bool>]
A -->|ToInt| C[Option<i64>/Option<usize> to Option<i32>]
A -->|ToOptU64| D[Option<i64> to Option<u64>]
A -->|ToFloat| E[Option<i64> to Option<f64>]
F[Functions]
F --> G[format_big_int]
F --> H[format_big_int_dec]
F --> I[u64_to_string]
F --> J[init_tracing]
F --> K[ecc_from_bytes]
F --> L[query_order_by_str]
K --> M[tvm_types::read_single_root_boc]
K --> N[tvm_block::ExtraCurrencyCollection]
L --> O[crate::schema::graphql_ext::QueryOrderBy]
J --> P[tracing_subscriber::registry]
J --> Q[tracing_subscriber::filter::Targets]
style A fill:#f9f,stroke:#333,stroke-width:1px
style F fill:#bbf,stroke:#333,stroke-width:1px