#![cfg(any(target_os = "linux", target_os = "l4re", target_os = "android"))]
use {
std::os::unix::net::{SocketAddr, UnixListener},
crate::Result,
};
#[derive(Debug)]
pub struct Namaste {
_unix_listener: UnixListener,
}
impl Namaste {
pub (crate) fn make<B>(id: B) -> Result<Self> where B: AsRef<[u8]> {
Ok(Self {
_unix_listener: UnixListener::bind_addr(&SocketAddr::from_abstract_namespace(id.as_ref())?)?,
})
}
}