1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::{helper_layers::route::Router, service::http_route::match_request::HttpRouteMatch};
use std::{ops::Deref, sync::Arc};

#[derive(Debug, Clone)]
pub struct Matched<R: Router> {
    pub router: R,
    pub index: R::Index,
}

#[derive(Debug, Clone)]
pub struct MatchedSgRouter(pub Arc<HttpRouteMatch>);

impl Deref for MatchedSgRouter {
    type Target = HttpRouteMatch;

    fn deref(&self) -> &Self::Target {
        self.0.as_ref()
    }
}