use kafka_client_core::{BatchExecutionId, ProducerInput};
#[must_use = "driver acceptance must be applied to the exact producer execution"]
pub(crate) struct AcceptedProduceCall {
execution: BatchExecutionId,
}
impl AcceptedProduceCall {
pub(super) const fn new(execution: BatchExecutionId) -> Self {
Self { execution }
}
pub(crate) const fn execution(&self) -> BatchExecutionId {
self.execution
}
pub(crate) const fn driver_accepted(&self) -> ProducerInput {
ProducerInput::DriverAccepted {
execution: self.execution,
}
}
pub(crate) const fn confirm_receipt(self) {
let Self {
execution: _confirmed_execution,
} = self;
}
}