pub enum RouteVerdictAtomic<'a, G: Html> {
Found(RouteInfoAtomic<'a, G>),
NotFound,
LocaleDetection(String),
}
Expand description
The possible outcomes of matching a route. This is an alternative implementation of Sycamore’s Route
trait to enable greater
control and tighter integration of routing with templates. This can only be used if Routes
has been defined in context (done
automatically by the CLI).
This version uses RouteInfoAtomic
, and is designed for multithreaded scenarios (i.e. on the server).
Variants
Found(RouteInfoAtomic<'a, G>)
The given route was found, and route information is attached.
NotFound
The given route was not found, and a 404 Not Found
page should be shown.
LocaleDetection(String)
The given route maps to the locale detector, which will redirect the user to the attached path (in the appropriate locale).
Trait Implementations
Auto Trait Implementations
impl<'a, G> !RefUnwindSafe for RouteVerdictAtomic<'a, G>
impl<'a, G> Send for RouteVerdictAtomic<'a, G>
impl<'a, G> Sync for RouteVerdictAtomic<'a, G>
impl<'a, G> Unpin for RouteVerdictAtomic<'a, G>
impl<'a, G> !UnwindSafe for RouteVerdictAtomic<'a, G>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more