http_path_params/
path_params_info.rs1use alloc::{boxed::Box, string::String, vec::Vec};
2use core::ops::{Deref, DerefMut};
3
4pub type PathParamsInfoInner = Vec<(Option<Box<str>>, String)>;
6
7#[derive(Debug, Clone, Default, PartialEq, Eq)]
9pub struct PathParamsInfo(pub PathParamsInfoInner);
10
11impl PathParamsInfo {
12 pub fn new() -> Self {
13 Self::default()
14 }
15}
16
17impl Deref for PathParamsInfo {
19 type Target = PathParamsInfoInner;
20
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25
26impl DerefMut for PathParamsInfo {
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31
32impl From<PathParamsInfoInner> for PathParamsInfo {
34 fn from(v: PathParamsInfoInner) -> Self {
35 Self(v)
36 }
37}