pub trait HostChargeTargetStore: Send + Sync {
// Required methods
fn preflight_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
reservation: &'life2 HostChargeTargetReservation,
) -> Pin<Box<dyn Future<Output = Result<HostChargeReservationDecision, HostChargeTargetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn reserve_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
reservation: &'life2 HostChargeTargetReservation,
) -> Pin<Box<dyn Future<Output = Result<HostChargeReservationDecision, HostChargeTargetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn admit_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
admission: &'life2 HostChargeSubmissionAdmission,
) -> Pin<Box<dyn Future<Output = Result<HostChargeSubmissionDecision, HostChargeTargetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn apply_transition<'life0, 'life1, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
transition: HostChargeTargetTransition,
) -> Pin<Box<dyn Future<Output = Result<HostChargeTargetTransitionOutcome, HostChargeTargetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Host-owned target extension composed into shared ledger transactions.
Implementations must use only the supplied connection. Reservation and
submission lock the target before calling host_charge_ledger_admission.
Required Methods§
Sourcefn preflight_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
reservation: &'life2 HostChargeTargetReservation,
) -> Pin<Box<dyn Future<Output = Result<HostChargeReservationDecision, HostChargeTargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn preflight_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
reservation: &'life2 HostChargeTargetReservation,
) -> Pin<Box<dyn Future<Output = Result<HostChargeReservationDecision, HostChargeTargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Locks and snapshots the target for replay/conflict preflight without changing host business state.
fn reserve_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
reservation: &'life2 HostChargeTargetReservation,
) -> Pin<Box<dyn Future<Output = Result<HostChargeReservationDecision, HostChargeTargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn admit_submission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
admission: &'life2 HostChargeSubmissionAdmission,
) -> Pin<Box<dyn Future<Output = Result<HostChargeSubmissionDecision, HostChargeTargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn apply_transition<'life0, 'life1, 'async_trait>(
&'life0 self,
connection: &'life1 mut PgConnection,
transition: HostChargeTargetTransition,
) -> Pin<Box<dyn Future<Output = Result<HostChargeTargetTransitionOutcome, HostChargeTargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".