pub trait EventUpcaster<Event> {
type Error;
// Required method
fn upcast(&self, event: Event) -> Result<Event, Self::Error>;
}Expand description
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§
Sourcetype Error
type Error
English:
Transformation failure forwarded unchanged by UpcasterChain::apply.
日本語:
UpcasterChain::apply が変更せず伝播する変換の失敗です。
Required Methods§
Sourcefn upcast(&self, event: Event) -> Result<Event, Self::Error>
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".