use std::ffi::{OsStr, OsString};
use super::ServerRef;
pub struct WindowsPipeServerRef {
pub(crate) addr: OsString,
pub(crate) inner: Box<dyn ServerRef>,
}
impl WindowsPipeServerRef {
pub fn new(addr: OsString, inner: Box<dyn ServerRef>) -> Self {
Self { addr, inner }
}
pub fn addr(&self) -> &OsStr {
&self.addr
}
pub fn into_inner(self) -> Box<dyn ServerRef> {
self.inner
}
}
impl ServerRef for WindowsPipeServerRef {
fn is_finished(&self) -> bool {
self.inner.is_finished()
}
fn shutdown(&self) {
self.inner.shutdown();
}
}