pub struct ProjectionCheckpoint<C> { /* private fields */ }Expand description
English:
Owned cursor identifying progress in a projection’s input stream.
The cursor type and meaning belong to the application. This container performs no ordering, monotonicity, or validity checks and does not store progress by itself.
Borrow a cursor for inspection, then recover its ownership without cloning.
日本語:
プロジェクションの入力ストリームにおける進捗を示す、所有されたカーソルです。
カーソルの型と意味はアプリケーションが定めます。このコンテナーは順序、単調性、妥当性を 検証せず、単体では進捗を保存しません。
カーソルを借用して確認した後、複製せずに所有権を取り出せます。
§Example / 使用例
use ddd_toolkit_core::ProjectionCheckpoint;
let checkpoint = ProjectionCheckpoint::new(String::from("partition-2:17"));
assert_eq!(checkpoint.cursor(), "partition-2:17");
let cursor = checkpoint.into_cursor();
assert_eq!(cursor, "partition-2:17");Implementations§
Source§impl<C> ProjectionCheckpoint<C>
impl<C> ProjectionCheckpoint<C>
Sourcepub fn new(cursor: C) -> ProjectionCheckpoint<C>
pub fn new(cursor: C) -> ProjectionCheckpoint<C>
English:
Wraps cursor without validating its position or comparing previous progress.
日本語:
位置の検証や以前の進捗との比較をせずに cursor を包みます。
Sourcepub fn cursor(&self) -> &C
pub fn cursor(&self) -> &C
English:
Borrows the stored cursor without advancing it.
日本語:
進めることなく、保存されたカーソルを借用します。
Sourcepub fn into_cursor(self) -> C
pub fn into_cursor(self) -> C
English:
Consumes the checkpoint and returns its cursor by value.
日本語:
チェックポイントを消費し、カーソルを値として返します。
Trait Implementations§
Source§impl<C> Clone for ProjectionCheckpoint<C>where
C: Clone,
impl<C> Clone for ProjectionCheckpoint<C>where
C: Clone,
Source§fn clone(&self) -> ProjectionCheckpoint<C>
fn clone(&self) -> ProjectionCheckpoint<C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more