pub struct HttpRuntimePlan {
pub middleware: Vec<MiddlewareStage>,
pub routes: Vec<RouteDefinition>,
}Fields§
§middleware: Vec<MiddlewareStage>§routes: Vec<RouteDefinition>Implementations§
Source§impl HttpRuntimePlan
impl HttpRuntimePlan
pub fn resolve( &self, config: &PlatformConfig, method: HttpMethod, host: &str, path: &str, ) -> Option<ResolvedRoute>
pub fn resolve_match( &self, config: &PlatformConfig, method: HttpMethod, host: &str, path: &str, ) -> Option<ResolvedRouteMatch>
pub fn path_for( &self, config: &PlatformConfig, route_name: &str, params: &BTreeMap<String, String>, locale: Option<&str>, ) -> Result<String, RouteUrlError>
pub fn path_for_site( &self, config: &PlatformConfig, site_id: Option<&str>, route_name: &str, params: &BTreeMap<String, String>, locale: Option<&str>, ) -> Result<String, RouteUrlError>
pub fn absolute_url_for( &self, config: &PlatformConfig, route_name: &str, params: &BTreeMap<String, String>, locale: Option<&str>, ) -> Result<String, RouteUrlError>
pub fn absolute_url_for_site( &self, config: &PlatformConfig, site_id: Option<&str>, route_name: &str, params: &BTreeMap<String, String>, locale: Option<&str>, ) -> Result<String, RouteUrlError>
Trait Implementations§
Source§impl Clone for HttpRuntimePlan
impl Clone for HttpRuntimePlan
Source§fn clone(&self) -> HttpRuntimePlan
fn clone(&self) -> HttpRuntimePlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRuntimePlan
impl Debug for HttpRuntimePlan
Source§impl PartialEq for HttpRuntimePlan
impl PartialEq for HttpRuntimePlan
impl Eq for HttpRuntimePlan
impl StructuralPartialEq for HttpRuntimePlan
Auto Trait Implementations§
impl Freeze for HttpRuntimePlan
impl RefUnwindSafe for HttpRuntimePlan
impl Send for HttpRuntimePlan
impl Sync for HttpRuntimePlan
impl Unpin for HttpRuntimePlan
impl UnsafeUnpin for HttpRuntimePlan
impl UnwindSafe for HttpRuntimePlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more