1use std::fmt::Debug;
2mod maybe_param;
3mod combine_paths;
4
5pub trait Routable {
6 fn routes() -> impl ::leptos::IntoView;
7
8 fn flat_routes() -> impl ::leptos::IntoView;
9
10 fn fallback() -> impl ::leptos::IntoView;
11
12 fn parent_route<
13 Path,
14 View,
15 >(
16 path: Path,
17 view: View,
18 ssr: ::leptos_router::SsrMode,
19 ) -> impl ::leptos_router::MatchNestedRoutes + Clone
20 where
21 Path: Send
22 + Sync
23 + 'static
24 + Clone
25 + Debug
26 + ::leptos_router::PossibleRouteMatch,
27 View: ::leptos_router::ChooseView;
28
29 fn protected_parent_route<
30 Path,
31 View,
32 ViewFn,
33 ConditionFn,
34 RedirectPathFn,
35 RedirectPath,
36 >(
37 path: Path,
38 view: ViewFn,
39 condition: ConditionFn,
40 fallback: ::leptos::children::ViewFn,
41 redirect_path: RedirectPathFn,
42 ssr: ::leptos_router::SsrMode,
43 ) -> impl ::leptos_router::MatchNestedRoutes + Clone
44 where
45 Path: Send
46 + Sync
47 + 'static
48 + Clone
49 + Debug
50 + ::leptos_router::PossibleRouteMatch,
51 ViewFn: Fn() -> View + Send + Clone + 'static,
52 View: ::leptos::IntoView + 'static,
53 ConditionFn: Fn() -> Option<bool> + Send + Clone + 'static,
54 RedirectPathFn: Fn() -> RedirectPath + Send + Clone + 'static,
55 RedirectPath: ::std::fmt::Display + 'static;
56}
57
58
59pub mod prelude {
60 pub use leptos_routable_macro::*;
61 pub use crate::maybe_param::*;
62 pub use super::Routable;
63 pub use super::combine_paths::combine_paths;
64}