/// Initialize navigation with the given url:
/// - Extract the base url from it.
/// - Navigate to the given url and add it to the history.
/// Mostly to be used inside the init() in Seed.
/// ```rust
/// extern crate seed_routing;
/// #[macro_use]
/// use seed_routing::{View, *};
/// use seed::prelude::*;
/// add_router!();
/// // Empty Model for example
/// struct Model {}
///
/// fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
///     orders.subscribe(Msg::UrlChanged);
///     router().init(url);
///
///     Model {
/// // Empty Model for example
/// }
/// }
/// enum Msg {
///     UrlChanged(subs::UrlChanged),
/// }
///
/// #[derive(Debug, PartialEq, Clone, ParseUrl, WithDefaultRoute)]
/// pub enum Routes {
///     #[default_route]
///     NotFound,
/// }
/// ```
Initialize navigation with the given url:
Extract the base url from it.
Navigate to the given url and add it to the history.
Mostly to be used inside the init() in Seed.
```rust
extern crate seed_routing.
Initialize navigation with the given url : Extract the base url from it . Navigate to the given url and add it to the history . Mostly to be used inside the init () in Seed . ` ` ` rust extern crate seed_routing .
pub fn init(&self, url: Url) -> &Self {
        self.set_base_url(&url);
        self.navigate_to_url(url);
        self
    }
pub fn init ( & self , url : Url ) -> & Self { self . set_base_url ( & url ) ; self . navigate_to_url ( url ) ; self }
Initialize navigation with the given url:
 Extract the base url from it.
Initialize navigation with the given url : Extract the base url from it .
&self
url
Url
[macro_use]
use seed_routing::{View, *};
use seed::prelude::*;
add_router!();
Empty Model for example
struct Model {}

fn init(url: Url, orders: &mut impl Orders) -> Model {
orders.subscribe(Msg::UrlChanged);
router().init(url).

Model {
Empty Model for example
}
}
enum Msg {
UrlChanged(subs::UrlChanged),
}
use seed_routing :: { View * } ; use seed :: prelude :: * ; add_router! () ; Empty Model for example struct Model {} fn init ( url : Url orders : &mut impl Orders ) - > Model { orders . subscribe ( Msg :: UrlChanged ) ; router () . init ( url ) . Model { Empty Model for example } } enum Msg { UrlChanged ( subs :: UrlChanged ) }
[derive(debug, partialeq, clone, parseurl, withdefaultroute)]
pub enum Routes {
[default_route]
NotFound,
}
```
pub enum Routes { [ default_route ] NotFound } ` ` `