pub trait RoutePlacement {
// Required methods
fn asset_origin(&self, component: &str, path: &str) -> Option<String>;
fn backend_origin(&self, component: &str, path: &str) -> Option<String>;
// Provided method
fn auth_required_prefixes(&self) -> &[String] { ... }
}Expand description
The placement-time facts a declared route cannot answer about itself.
Two separate methods rather than one origin lookup because the two resolutions have nothing in common: a static route’s origin is a published storage prefix that exists before anything is deployed, and a backend route’s is the address of a running unit. Collapsing them would force every implementor to re-derive the mode from the component ref.
None from either is a refused compile (DomainConfig::route_table), not
a skipped entry.
Required Methods§
Provided Methods§
Sourcefn auth_required_prefixes(&self) -> &[String]
fn auth_required_prefixes(&self) -> &[String]
Path prefixes the door fronting this domain requires a bearer on —
PasswayAuth::require_prefixes, verbatim. Default: an anonymous door,
which is every Worker-fronted domain (the Worker arm has no bearer auth
at all).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".