Expand description
The Sycamore Router.
Structs§
- History
Integration - A router integration that uses the HTML5 History API to keep the UI in sync with the URL.
- Route
Path - A list of
Segments. - Router
Base Props - Props for
RouterBase. - Router
Props - Props for
Router. - Static
Router Props - Props for
StaticRouter.
Enums§
- Capture
- Represents a capture of an URL segment or segments.
- Segment
- Represents an URL segment or segments.
Traits§
- Integration
- A router integration provides the methods for adapting a router to a certain environment (e.g. history API).
- Route
- Trait that is implemented for
enums that can match routes. - TryFrom
Param - Fallible conversion between a param capture into a value.
- TryFrom
Segments - Fallible conversion between a list of param captures into a value.
Functions§
- Router
- The sycamore router component. This component expects to be used inside a browser environment.
For server environments, see
StaticRouter. - Router
Base - A lower-level router component that takes an instance of your
Routetype. This is designed forstructRoutes, which can be used to store additional information along with routes. - Static
Router - A router that only renders once with the given
route. - navigate
- Navigates to the specified
url. The url should have the same origin as the app. - navigate_
replace - Navigates to the specified
urlwithout adding a new history entry. Instead, this replaces the current location with the newurl. The url should have the same origin as the app.
Derive Macros§
- Route
- The
Routeprocedural macro.