pub struct ScreenshotPublisher { /* private fields */ }Expand description
Publishes native renderer frames to the Agent API without making the HTTP server poll a file that may still be written by the renderer.
Implementations§
Source§impl ScreenshotPublisher
impl ScreenshotPublisher
pub fn new() -> Self
Sourcepub fn publish_png(&self, png: &[u8])
pub fn publish_png(&self, png: &[u8])
Publish a complete PNG frame. Oversized or empty frames are rejected so a broken renderer cannot turn the Agent endpoint into an unbounded IPC sink.
pub fn generation(&self) -> u64
pub async fn latest(&self) -> Option<PublishedScreenshot>
pub async fn wait_for_next( &self, after_generation: u64, timeout: Duration, ) -> Option<PublishedScreenshot>
Trait Implementations§
Source§impl Clone for ScreenshotPublisher
impl Clone for ScreenshotPublisher
Source§fn clone(&self) -> ScreenshotPublisher
fn clone(&self) -> ScreenshotPublisher
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 ScreenshotPublisher
impl !UnwindSafe for ScreenshotPublisher
impl Freeze for ScreenshotPublisher
impl Send for ScreenshotPublisher
impl Sync for ScreenshotPublisher
impl Unpin for ScreenshotPublisher
impl UnsafeUnpin for ScreenshotPublisher
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