use super::ServerRef; use std::ffi::{OsStr, OsString}; /// Reference to a unix socket server instance pub struct WindowsPipeServerRef { pub(crate) addr: OsString, pub(crate) inner: Box, } impl WindowsPipeServerRef { pub fn new(addr: OsString, inner: Box) -> Self { Self { addr, inner } } /// Returns the addr that the listener is bound to pub fn addr(&self) -> &OsStr { &self.addr } /// Consumes ref, returning inner ref pub fn into_inner(self) -> Box { self.inner } } impl ServerRef for WindowsPipeServerRef { fn is_finished(&self) -> bool { self.inner.is_finished() } fn shutdown(&self) { self.inner.shutdown(); } }