pub struct BeginFrameReturns<'a> { /* private fields */ }Expand description
Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with –run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background.
Implementations§
Source§impl<'a> BeginFrameReturns<'a>
impl<'a> BeginFrameReturns<'a>
Sourcepub fn builder(has_damage: bool) -> BeginFrameReturnsBuilder<'a>
pub fn builder(has_damage: bool) -> BeginFrameReturnsBuilder<'a>
Creates a builder for this type with the required parameters:
has_damage: Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
Sourcepub fn has_damage(&self) -> bool
pub fn has_damage(&self) -> bool
Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
Sourcepub fn screenshot_data(&self) -> Option<&str>
pub fn screenshot_data(&self) -> Option<&str>
Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)
Trait Implementations§
Source§impl<'a> Clone for BeginFrameReturns<'a>
impl<'a> Clone for BeginFrameReturns<'a>
Source§fn clone(&self) -> BeginFrameReturns<'a>
fn clone(&self) -> BeginFrameReturns<'a>
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 moreSource§impl<'a> Debug for BeginFrameReturns<'a>
impl<'a> Debug for BeginFrameReturns<'a>
Source§impl<'a> Default for BeginFrameReturns<'a>
impl<'a> Default for BeginFrameReturns<'a>
Source§fn default() -> BeginFrameReturns<'a>
fn default() -> BeginFrameReturns<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for BeginFrameReturns<'a>
impl<'de, 'a> Deserialize<'de> for BeginFrameReturns<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for BeginFrameReturns<'a>
impl<'a> RefUnwindSafe for BeginFrameReturns<'a>
impl<'a> Send for BeginFrameReturns<'a>
impl<'a> Sync for BeginFrameReturns<'a>
impl<'a> Unpin for BeginFrameReturns<'a>
impl<'a> UnsafeUnpin for BeginFrameReturns<'a>
impl<'a> UnwindSafe for BeginFrameReturns<'a>
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