pub enum FrameKind {
Tile,
Gap,
Resumed,
}Expand description
What a frame-plane message carries.
The gap variant is why this enum exists. A locked workstation, a UAC
prompt or a display mode change stops capture dead (see the agent’s
screen_capture), and a viewer only ever told about tiles cannot
distinguish “the picture is still because nothing is changing” from “we
cannot see the screen at all”. Those need different words on screen, so
they need different messages on the wire.
Gaps ride the frame plane rather than the control plane because they are part of what the viewer is showing, not a request or a reply — and because arriving in order with the tiles is what makes them meaningful. A gap delivered out of band could easily be painted after the frames that already resumed.
Variants§
Tile
Headers carry a FrameMeta; payload is the encoded image.
Gap
Headers carry nothing else; payload is a UTF-8 reason string.
Resumed
Capture works again, but there is nothing new to show yet. No headers beyond the kind, no payload.
Without this, recovery is only observable when the next tile happens to arrive — and a desktop that is reachable but unchanged produces no tiles at all. An operator would keep reading “screen unavailable” for as long as nobody moved a window, long after capture had recovered.
The alternative was to force a full frame on recovery, which would have meant sending several hundred KB to say “nothing changed” — the opposite of the bandwidth argument that shaped this whole format.
Implementations§
Trait Implementations§
impl Copy for FrameKind
impl Eq for FrameKind
impl StructuralPartialEq for FrameKind
Auto Trait Implementations§
impl Freeze for FrameKind
impl RefUnwindSafe for FrameKind
impl Send for FrameKind
impl Sync for FrameKind
impl Unpin for FrameKind
impl UnsafeUnpin for FrameKind
impl UnwindSafe for FrameKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.