pub trait ProjectionCheckpointStore {
type Cursor;
type Error;
// Required methods
fn load(
&self,
) -> Result<Option<ProjectionCheckpoint<Self::Cursor>>, Self::Error>;
fn save(
&mut self,
checkpoint: ProjectionCheckpoint<Self::Cursor>,
) -> Result<(), Self::Error>;
}Expand description
English:
Synchronous persistence port for a projection’s checkpoint.
With no projection identifier parameter, the store instance determines the checkpoint scope. Implementations define replacement, durability, concurrency, panic conditions, and whether saving progress is atomic with read-model updates. This trait supplies no monotonicity check.
日本語:
プロジェクションのチェックポイントを同期永続化するポートです。
プロジェクション識別子の引数がないため、保存対象の範囲はストアのインスタンスが定めます。 置換、永続性、並行処理、パニック条件、読み取りモデル更新との原子的な進捗保存は 実装が定めます。このトレイトは単調性の検証を提供しません。
Required Associated Types§
Required Methods§
Sourcefn load(
&self,
) -> Result<Option<ProjectionCheckpoint<Self::Cursor>>, Self::Error>
fn load( &self, ) -> Result<Option<ProjectionCheckpoint<Self::Cursor>>, Self::Error>
English:
Returns stored progress, Ok(None) for absence, or a storage error.
Absence is distinct from failing to read the checkpoint.
日本語:
保存済み進捗、不在を表す Ok(None)、またはストレージエラーを返します。
不在とチェックポイントの読み込み失敗は区別します。
Sourcefn save(
&mut self,
checkpoint: ProjectionCheckpoint<Self::Cursor>,
) -> Result<(), Self::Error>
fn save( &mut self, checkpoint: ProjectionCheckpoint<Self::Cursor>, ) -> Result<(), Self::Error>
English:
Consumes checkpoint to persist progress, returning Ok(()) or a storage error.
The value is not returned on failure; retry and partial-write behavior depend on the adapter.
日本語:
checkpoint を消費して進捗を保存し、Ok(()) またはストレージエラーを返します。
失敗時に値は返されません。再試行と部分書き込みの挙動はアダプターに依存します。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".