pub struct ResolvedPayment {
pub rate_per_mb: u64,
pub credit_max: u64,
pub credit_ramp_divisor: u64,
pub frame_target_bytes: u64,
pub voucher_commit_interval_ms: u64,
}Expand description
Resolved payment fields.
Fields§
§rate_per_mb: u64Rate per MB in USDC base units (6 decimals).
credit_max: u64Credit-window ceiling in bytes (ADR 003 §Credit window). The per-stream
window ramps toward this cap as the stream pays; floored at one chunk
(decdn_protocol::client::CHUNK_BYTES, the payment quantum) plus one
16 KiB chunk group, the leaf the payer verifies before it pays.
See crate::config::DEFAULT_CREDIT_MAX.
credit_ramp_divisor: u64Ramp divisor for the credit window; 0 opens the full ceiling immediately.
frame_target_bytes: u64Target wire-frame size for the serve path, in bytes (ADR 005
§cdn/client/v1). See crate::config::DEFAULT_FRAME_TARGET_BYTES (1 MiB).
Clamped down to the credit window’s remaining room per frame.
voucher_commit_interval_ms: u64Background flush period for the lane store, in ms. See
crate::config::DEFAULT_VOUCHER_COMMIT_INTERVAL_MS (5 s). Must be > 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResolvedPayment
impl RefUnwindSafe for ResolvedPayment
impl Send for ResolvedPayment
impl Sync for ResolvedPayment
impl Unpin for ResolvedPayment
impl UnsafeUnpin for ResolvedPayment
impl UnwindSafe for ResolvedPayment
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> 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