pub trait DesktopProtocol: Send + Sync {
// Required methods
fn start_frame_loop<'life0, 'async_trait>(
&'life0 self,
frame_tx: UnboundedSender<FrameUpdate>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_key<'life0, 'async_trait>(
&'life0 self,
key_code: u32,
down: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_pointer<'life0, 'async_trait>(
&'life0 self,
x: u16,
y: u16,
button_mask: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn request_full_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_clipboard<'life0, 'async_trait>(
&'life0 self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn desktop_size(&self) -> (u16, u16);
fn resize<'life0, 'async_trait>(
&'life0 mut self,
width: u16,
height: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Unified trait for RDP and VNC remote desktop protocol clients.
Both RdpClient and VncClient implement this trait so that the
ConnectionManager and Tauri commands can work protocol-agnostically.
Required Methods§
Sourcefn start_frame_loop<'life0, 'async_trait>(
&'life0 self,
frame_tx: UnboundedSender<FrameUpdate>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_frame_loop<'life0, 'async_trait>(
&'life0 self,
frame_tx: UnboundedSender<FrameUpdate>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the frame update loop, sending FrameUpdate messages via the
provided sender until the cancellation token is triggered.
Sourcefn send_key<'life0, 'async_trait>(
&'life0 self,
key_code: u32,
down: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_key<'life0, 'async_trait>(
&'life0 self,
key_code: u32,
down: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a keyboard event to the remote host.
Sourcefn send_pointer<'life0, 'async_trait>(
&'life0 self,
x: u16,
y: u16,
button_mask: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_pointer<'life0, 'async_trait>(
&'life0 self,
x: u16,
y: u16,
button_mask: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a pointer (mouse) event to the remote host.
Sourcefn request_full_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_full_frame<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request a full framebuffer update from the remote host.
Sourcefn set_clipboard<'life0, 'async_trait>(
&'life0 self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_clipboard<'life0, 'async_trait>(
&'life0 self,
text: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send clipboard text to the remote session.
Sourcefn desktop_size(&self) -> (u16, u16)
fn desktop_size(&self) -> (u16, u16)
Get the remote desktop dimensions (width, height).
Sourcefn resize<'life0, 'async_trait>(
&'life0 mut self,
width: u16,
height: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resize<'life0, 'async_trait>(
&'life0 mut self,
width: u16,
height: u16,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the remote desktop to resize to the given dimensions. For RDP: sends a display resize request to the server. For VNC: no-op (VNC does not support server-side resize; client-side scaling is used).