pub trait UploadAdapter: AdapterBounds {
Show 22 methods
// Required methods
fn load<'life0, 'async_trait>(
&'life0 self,
record: UploadRecord,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pay<'life0, 'life1, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn pay_merkle<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn pay_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn recover_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn pay_merkle_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn recover_merkle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn initialize_payment_attempt(&self, _attempt: &mut PaymentAttempt) { ... }
fn submit_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn reconcile_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn submit_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn reconcile_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
_plan: &'life1 mut ChunkPaymentPlan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_state: &'life1 UploadState,
_payment: Option<&'life2 UploadPayment>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn quote_limit(&self) -> usize { ... }
fn stored(&self, _stored: usize, _total: usize) { ... }
fn record_stored(&self, _index: usize, _total: usize) { ... }
fn quoted(&self, _quoted: usize, _total: usize) { ... }
fn checked(&self, _checked: usize, _total: usize) { ... }
fn already_stored(&self, _index: usize, _total: usize) { ... }
fn payment_quotes(&self, _completed: usize, _total: usize) { ... }
fn preparing(&self, _message: &str) { ... }
}Expand description
Only byte loading, wallet submission, endpoint admission, and persistence vary by platform.
Required Methods§
Sourcefn load<'life0, 'async_trait>(
&'life0 self,
record: UploadRecord,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
record: UploadRecord,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load one previously described record.
Sourcefn pay<'life0, 'life1, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pay<'life0, 'life1, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Submit the native single-node payment plans and await confirmation.
Provided Methods§
Sourcefn pay_merkle<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pay_merkle<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Submit a prepared Merkle batch and await its confirmed winner.
Sourcefn pay_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pay_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submit with a durable attempt already recorded; adapters can journal broadcast evidence.
Sourcefn recover_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn recover_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_plans: &'life1 [ChunkPaymentPlan],
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Observe an existing attempt without broadcasting another transaction.
Sourcefn pay_merkle_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pay_merkle_tracked<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submit a Merkle payment with the prepared attempt already persisted.
Sourcefn recover_merkle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn recover_merkle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_batch: &'life1 PreparedMerkleBatch,
_state: &'life2 UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Observe an existing Merkle attempt without broadcasting.
Sourcefn initialize_payment_attempt(&self, _attempt: &mut PaymentAttempt)
fn initialize_payment_attempt(&self, _attempt: &mut PaymentAttempt)
Initialize adapter-owned recovery evidence before persisting an attempt.
Sourcefn submit_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn submit_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submit while updating the shared journal. Existing adapters may keep their callback journal.
Sourcefn reconcile_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reconcile_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
plans: &'life1 [ChunkPaymentPlan],
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<UploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reconcile a previous submission while updating its journal.
Sourcefn submit_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn submit_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Submit a Merkle payment with mutable recovery evidence.
Sourcefn reconcile_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reconcile_merkle_payment<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
batch: &'life1 PreparedMerkleBatch,
state: &'life2 mut UploadState,
) -> Pin<Box<dyn Future<Output = Result<MerkleUploadPayment>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reconcile a Merkle payment without creating a new transaction.
Sourcefn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
_plan: &'life1 mut ChunkPaymentPlan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
_plan: &'life1 mut ChunkPaymentPlan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check transport-specific endpoint capabilities before payment.
Sourcefn checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_state: &'life1 UploadState,
_payment: Option<&'life2 UploadPayment>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_state: &'life1 UploadState,
_payment: Option<&'life2 UploadPayment>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist before submission and again before any paid data is loaded/stored.
Sourcefn quote_limit(&self) -> usize
fn quote_limit(&self) -> usize
Adapter resource ceiling; the adaptive controller still controls scheduling.
Sourcefn stored(&self, _stored: usize, _total: usize)
fn stored(&self, _stored: usize, _total: usize)
Report a completed store or an already-present record.
Sourcefn record_stored(&self, _index: usize, _total: usize)
fn record_stored(&self, _index: usize, _total: usize)
Report a successful write in this attempt, identified by stable index + 1.
Sourcefn quoted(&self, _quoted: usize, _total: usize)
fn quoted(&self, _quoted: usize, _total: usize)
Report a completed quote (the first argument is the stable record index + 1).
Sourcefn checked(&self, _checked: usize, _total: usize)
fn checked(&self, _checked: usize, _total: usize)
Report existing-storage checks, which do not complete payment quotes.
Sourcefn already_stored(&self, _index: usize, _total: usize)
fn already_stored(&self, _index: usize, _total: usize)
Report a record confirmed already present, identified by stable index + 1.
Sourcefn payment_quotes(&self, _completed: usize, _total: usize)
fn payment_quotes(&self, _completed: usize, _total: usize)
Report validated Merkle candidate pools for the current payment batch.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".