freya_router/
lib.rs

1// cannot use forbid, because props derive macro generates #[allow(missing_docs)]
2#![allow(non_snake_case)]
3
4mod memory;
5
6pub mod navigation;
7pub mod routable;
8
9/// Components interacting with the router.
10pub mod components {
11    mod outlet;
12    pub use outlet::*;
13
14    mod router;
15    pub use router::*;
16
17    #[doc(hidden)]
18    pub mod child_router;
19}
20
21mod contexts {
22    pub(crate) mod navigator;
23    pub(crate) mod outlet;
24    pub use outlet::{
25        OutletContext,
26        use_outlet_context,
27    };
28    pub(crate) mod router;
29    pub use navigator::*;
30    pub(crate) use router::*;
31    pub use router::{
32        GenericRouterContext,
33        ParseRouteError,
34        RouterContext,
35    };
36}
37
38mod router_cfg;
39
40/// Hooks for interacting with the router in components.
41pub mod hooks {
42    mod use_route;
43    pub use use_route::*;
44}
45
46/// A collection of useful items most applications might need.
47pub mod prelude {
48    pub use freya_router_macro::Routable;
49
50    pub use crate::{
51        components::{
52            outlet,
53            router,
54        },
55        contexts::*,
56        hooks::*,
57        memory::MemoryHistory,
58        navigation::*,
59        routable::*,
60        router_cfg::RouterConfig,
61    };
62}
63
64mod utils {
65    pub(crate) mod use_router_internal;
66}
67
68#[doc(hidden)]
69pub mod exports {
70    pub use urlencoding;
71}