freya_router/components/
outlet.rs1use std::marker::PhantomData;
2
3use freya_core::prelude::*;
4
5use crate::prelude::{
6 outlet::OutletContext,
7 *,
8};
9
10pub struct Outlet<R>(PhantomData<R>);
11
12impl<R> Default for Outlet<R> {
13 fn default() -> Self {
14 Self::new()
15 }
16}
17
18impl<R> Outlet<R> {
19 pub fn new() -> Self {
20 Self(PhantomData)
21 }
22}
23
24impl<R> PartialEq for Outlet<R> {
25 fn eq(&self, _other: &Self) -> bool {
26 true
27 }
28}
29
30impl<R: Routable> Component for Outlet<R> {
31 fn render(&self) -> impl IntoElement {
32 OutletContext::<R>::render()
33 }
34}