pub struct RouteResult {
pub cluster_id: Option<ClusterId>,
pub redirect: RedirectPolicy,
pub redirect_scheme: RedirectScheme,
pub redirect_template: Option<String>,
pub rewritten_host: Option<String>,
pub rewritten_path: Option<String>,
pub rewritten_port: Option<u16>,
pub headers_request: Rc<[HeaderEdit]>,
pub headers_response: Rc<[HeaderEdit]>,
pub required_auth: bool,
pub tags: Option<Rc<CachedTags>>,
}Expand description
Routing decision returned by Router::lookup and consumed by the
session layer.
Computed from a matched Frontend by running RewriteParts::run
against the captures collected during routing. Legacy Route::ClusterId
and Route::Deny entries synthesize a minimal RouteResult with the
proto enums set to defaults (FORWARD / UNAUTHORIZED) so existing
session code keeps working until the mux layer is updated to read every
RouteResult field directly.
Implements PartialEq for test parity: existing router tests compare
router.lookup(...) against an expected route. Equality compares every
public field, including the Rc<[HeaderEdit]> slices via pointer-or-content
equality on the slice contents.
Fields§
§cluster_id: Option<ClusterId>§redirect: RedirectPolicy§redirect_scheme: RedirectScheme§redirect_template: Option<String>§rewritten_host: Option<String>§rewritten_path: Option<String>§rewritten_port: Option<u16>§headers_request: Rc<[HeaderEdit]>§headers_response: Rc<[HeaderEdit]>§required_auth: boolImplementations§
Source§impl RouteResult
impl RouteResult
Trait Implementations§
Source§impl Clone for RouteResult
impl Clone for RouteResult
Source§fn clone(&self) -> RouteResult
fn clone(&self) -> RouteResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RouteResult
impl Debug for RouteResult
Source§impl PartialEq for RouteResult
impl PartialEq for RouteResult
Source§fn eq(&self, other: &RouteResult) -> bool
fn eq(&self, other: &RouteResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RouteResult
Auto Trait Implementations§
impl !Send for RouteResult
impl !Sync for RouteResult
impl Freeze for RouteResult
impl RefUnwindSafe for RouteResult
impl Unpin for RouteResult
impl UnsafeUnpin for RouteResult
impl UnwindSafe for RouteResult
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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