Skip to main content

EventUpcaster

Trait EventUpcaster 

Source
pub trait EventUpcaster<Event> {
    type Error;

    // Required method
    fn upcast(&self, event: Event) -> Result<Event, Self::Error>;
}
Expand description

English: Exposes core 0.4’s domain, persistence, and event-workflow API.

日本語: コア 0.4 のドメイン、永続化、イベント処理 API を公開します。 English: Exposes event schema identities and insertion-ordered, fallible upcasting stages.

日本語: イベントのスキーマ識別情報と、追加順の失敗し得る変換段階を公開します。 English: Fallible owned transformation from an event representation back to the same Rust type. Versions can be represented inside that type, but checking or advancing them is the implementation’s responsibility. No VersionedEvent bound or automatic version selection is used.

日本語: イベント表現を所有して受け取り、同じ Rust 型へ変換する、失敗し得る操作です。 型の内部にバージョンを表現できますが、その検査や更新は実装が担います。 VersionedEvent の境界や自動的なバージョン選択は用いません。

Required Associated Types§

Source

type Error

English: Transformation failure forwarded unchanged by UpcasterChain::apply.

日本語: UpcasterChain::apply が変更せず伝播する変換の失敗です。

Required Methods§

Source

fn upcast(&self, event: Event) -> Result<Event, Self::Error>

English: Consumes event, returning its transformed representation or an error. The input is not returned on error; side effects and panic conditions depend on the upcaster.

日本語: event を消費し、変換後の表現またはエラーを返します。 エラー時に入力は返しません。副作用とパニックの条件は変換器に依存します。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§