pub struct BeginFrameReturn { /* private fields */ }Available on crate features
experimental and HeadlessExperimental and Page and Runtime only.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.gl/3zHXhB for more background.
Implementations§
Source§impl BeginFrameReturn
impl BeginFrameReturn
pub fn new(has_damage: bool, screenshot_data: Option<String>) -> Self
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<&String>
pub fn screenshot_data(&self) -> Option<&String>
Base64-encoded image data of the screenshot, if one was requested and successfully taken.
Trait Implementations§
Source§impl Clone for BeginFrameReturn
impl Clone for BeginFrameReturn
Source§fn clone(&self) -> BeginFrameReturn
fn clone(&self) -> BeginFrameReturn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BeginFrameReturn
impl Debug for BeginFrameReturn
Source§impl<'de> Deserialize<'de> for BeginFrameReturn
impl<'de> Deserialize<'de> for BeginFrameReturn
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 Freeze for BeginFrameReturn
impl RefUnwindSafe for BeginFrameReturn
impl Send for BeginFrameReturn
impl Sync for BeginFrameReturn
impl Unpin for BeginFrameReturn
impl UnwindSafe for BeginFrameReturn
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