pub struct SimpleProxy { /* private fields */ }Expand description
A simple proxy server that spawns a thread for each client.
This server will create an acceptor and create a State for
each client that connects to the acceptor.
Implementations§
Source§impl SimpleProxy
impl SimpleProxy
Sourcepub fn new(baseline: Baseline) -> Result<SimpleProxy, SimpleProxyError>
pub fn new(baseline: Baseline) -> Result<SimpleProxy, SimpleProxyError>
Creates a new SimpleProxy.
Sourcepub fn display(&self) -> &str
pub fn display(&self) -> &str
Returns the name of the display used by this proxy.
The WAYLAND_DISPLAY environment variable should be set to this value for clients
that should connect to this proxy. See SimpleCommandExt::with_wayland_display.
Sourcepub fn run<H>(self, display_handler: impl Fn() -> H + Sync) -> SimpleProxyErrorwhere
H: WlDisplayHandler,
pub fn run<H>(self, display_handler: impl Fn() -> H + Sync) -> SimpleProxyErrorwhere
H: WlDisplayHandler,
Runs the proxy indefinitely.
This function does not return unless a fatal error occurs.
Auto Trait Implementations§
impl Freeze for SimpleProxy
impl RefUnwindSafe for SimpleProxy
impl !Send for SimpleProxy
impl !Sync for SimpleProxy
impl Unpin for SimpleProxy
impl UnwindSafe for SimpleProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more