pub trait BindableEndpoint {
// Required methods
fn method() -> Method;
fn pattern() -> String;
fn match_fn() -> Box<dyn Fn(&[&str]) -> bool + Send + Sync>;
}Expand description
Trait providing runtime endpoint metadata for binding.
Required Methods§
fn method() -> Method
fn pattern() -> String
fn match_fn() -> Box<dyn Fn(&[&str]) -> bool + Send + Sync>
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.
Implementations on Foreign Types§
Source§impl<E: Effect, T: BindableEndpoint> BindableEndpoint for Requires<E, T>
Requires<E, T> delegates all endpoint metadata to the inner type T.
impl<E: Effect, T: BindableEndpoint> BindableEndpoint for Requires<E, T>
Requires<E, T> delegates all endpoint metadata to the inner type T.
This allows bind!() to work with Requires-wrapped endpoints.
The Requires wrapper is purely a compile-time marker — at runtime,
routing behaves identically to the unwrapped endpoint.