shield-dioxus 0.3.0

Dioxus integration for Shield.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{collections::HashMap, ops::Deref};

#[derive(Clone, Debug)]
pub struct Query(HashMap<String, String>);

impl Query {
    pub fn parse(query: &str) -> Self {
        Self(serde_qs::from_str::<HashMap<String, String>>(query).unwrap_or_default())
    }
}

impl Deref for Query {
    type Target = HashMap<String, String>;

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