pub trait RecoverEvent<Input, Path>: Sized {
// Required method
fn recover(event: Self) -> Result<Input, Self>;
}Expand description
Exact recovery of one statically selected input from a returned event.
A failed runtime admission returns the complete root event. This ownership port recovers the original input without cloning, downcasting, or searching another lane. An event from a different lane is returned unchanged. Discarding the returned event cannot preserve an affine input:
ⓘ
type Event = behavior::EventLayer<
String,
behavior::User<behavior::MailAddr, ()>,
>;
let input = String::from("worker");
let event = <Event as behavior::InjectEvent<String, behavior::Here>>::inject_at(input);
drop(event);
drop(input);Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.