spacegate-kernel 0.2.0-alpha.4

A library-first, lightweight, high-performance, cloud-native supported API gateway
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{ops::Deref, sync::Arc};
#[derive(Debug, Clone)]
pub struct BackendHost(pub Arc<str>);

impl BackendHost {
    pub fn new(name: impl Into<Arc<str>>) -> Self {
        Self(name.into())
    }
}

impl Deref for BackendHost {
    type Target = str;

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