pub trait SendInput<Input, Path> {
// Required method
fn emit(&mut self, input: Input);
}Expand description
Static evidence that a sends type contains one request lane.
Implementations append the input exactly once to that lane and leave every
other lane unchanged. Path distinguishes repeated request types without
erasing their position or choosing a lane at runtime.
Own selects a named product’s own semantic lane. SendLayer carries
wrapper-owned and inner effects as explicit named fields; request routing
remains a compile-time proof rather than a runtime lane lookup. A wrapper’s
owned lane uses (Own, Path) and its inner lane uses Inside<Path>. A unique
input capability infers that proof through any number of wrappers. Repeated
capabilities require an explicit static selection; inference never chooses
one of two valid destinations.
let sends = behavior::SendLayer::new(vec![11_u32], Vec::<u8>::new());
let actions: behavior::Actions<behavior::MailAddr, behavior::Never, _, behavior::NoBirths> =
behavior::Actions::send(sends).with_send(7_u8).with_send(13_u32);
assert_eq!(actions.sends.owned, [11, 13]);
assert_eq!(actions.sends.inner, [7]);let mut sends = behavior::SendLayer::new(Vec::<u8>::new(), Vec::<u8>::new());
behavior::SendEffects::send(&mut sends, 7_u8);An input absent from both lanes remains unrepresentable:
let mut sends = behavior::SendLayer::new(Vec::<u16>::new(), Vec::<u32>::new());
behavior::SendEffects::send(&mut sends, 7_u8);Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".