pub struct DisplayProxyState {
pub provider: DisplayProvider,
pub display: String,
pub web_addr: SocketAddr,
pub window_manager: bool,
pub quality: u8,
/* private fields */
}Expand description
Minimal state used by the listener reverse proxy. Tests can construct this
without spawning KasmVNC; production keeps the process alive via _handle.
Fields§
§provider: DisplayProvider§display: String§web_addr: SocketAddr§window_manager: boolA window manager is running, so the client can use resize=remote
(dynamic framebuffer fit) rather than the letterboxed resize=scale.
quality: u8Image quality 0-100 seeded onto the client (see host::bootstrap).
Implementations§
Source§impl DisplayProxyState
impl DisplayProxyState
pub fn new( provider: DisplayProvider, handle: Arc<DisplayHandle>, quality: u8, ) -> Self
pub fn for_tests(web_port: u16) -> Self
Sourcepub async fn proxy(
self,
ws: Result<WebSocketUpgrade, WebSocketUpgradeRejection>,
uri: Uri,
request: Request,
) -> Response
pub async fn proxy( self, ws: Result<WebSocketUpgrade, WebSocketUpgradeRejection>, uri: Uri, request: Request, ) -> Response
Proxy an authenticated /ops/display request to the active provider.
Trait Implementations§
Source§impl Clone for DisplayProxyState
impl Clone for DisplayProxyState
Source§fn clone(&self) -> DisplayProxyState
fn clone(&self) -> DisplayProxyState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DisplayProxyState
impl !UnwindSafe for DisplayProxyState
impl Freeze for DisplayProxyState
impl Send for DisplayProxyState
impl Sync for DisplayProxyState
impl Unpin for DisplayProxyState
impl UnsafeUnpin for DisplayProxyState
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