pub struct TokenOptimizationConfig {
pub auto_enabled: bool,
pub target_output_count: u32,
pub min_outputs_threshold: u32,
}Expand description
Configuration for token-output optimization.
Fields§
§auto_enabled: boolWhether automatic token-output consolidation is enabled.
If set to true, the SDK will periodically consolidate a token’s outputs
once their count exceeds Self::min_outputs_threshold. Otherwise, no
automatic consolidation is performed.
Default value is true.
target_output_count: u32Number of token outputs to produce when token-output auto-consolidation fires.
Instead of collapsing a token’s outputs into a single output (which serializes subsequent payments), the SDK splits the consolidated balance across this many outputs of roughly equal value. Higher values preserve concurrency for parallel sends at the cost of a slightly larger output set.
Must be >= 1 and strictly less than Self::min_outputs_threshold.
Default value is 5.
min_outputs_threshold: u32Output count that triggers per-token auto-consolidation.
Auto-consolidation triggers for a token when its available output count strictly exceeds this threshold.
Must be greater than 1.
Default value is 50.
Trait Implementations§
Source§impl Clone for TokenOptimizationConfig
impl Clone for TokenOptimizationConfig
Source§fn clone(&self) -> TokenOptimizationConfig
fn clone(&self) -> TokenOptimizationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TokenOptimizationConfig
impl RefUnwindSafe for TokenOptimizationConfig
impl Send for TokenOptimizationConfig
impl Sync for TokenOptimizationConfig
impl Unpin for TokenOptimizationConfig
impl UnsafeUnpin for TokenOptimizationConfig
impl UnwindSafe for TokenOptimizationConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request