pub trait Runtime:
Send
+ Sync
+ 'static {
// Required method
fn provides(&self) -> Vec<Port>;
// Provided method
fn effectively_configured(&self, port: Port) -> bool { ... }
}Expand description
A runtime resolves environment bindings into Ports and declares
statically which ports it can provide, so Harness::build can reject a
module that requires something the runtime will never hand it
(ADR 0002). Reference implementation: cratefield-runtime-cloudflare.
Required Methods§
Provided Methods§
Sourcefn effectively_configured(&self, port: Port) -> bool
fn effectively_configured(&self, port: Port) -> bool
Whether the named port is not merely present but usable for its
production duty (issue #133): a captcha adapter that reports
itself unbound cannot protect a HumanForm route, so the runtime
that wraps it says “no” here even though provides() lists the
port. Default: presence in provides().
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".