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. beginFrame
Fields
has_damage: 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.
screenshot_data: Option<Binary>
Base64-encoded image data of the screenshot, if one was requested and successfully taken.
Implementations
sourceimpl BeginFrameReturns
impl BeginFrameReturns
pub fn new(has_damage: impl Into<bool>) -> BeginFrameReturns
sourceimpl BeginFrameReturns
impl BeginFrameReturns
pub fn builder() -> BeginFrameReturnsBuilder
Trait Implementations
sourceimpl Clone for BeginFrameReturns
impl Clone for BeginFrameReturns
sourcefn clone(&self) -> BeginFrameReturns
fn clone(&self) -> BeginFrameReturns
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BeginFrameReturns
impl Debug for BeginFrameReturns
sourceimpl<'de> Deserialize<'de> for BeginFrameReturns
impl<'de> Deserialize<'de> for BeginFrameReturns
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<BeginFrameReturns, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<BeginFrameReturns, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<BeginFrameReturns> for BeginFrameReturns
impl PartialEq<BeginFrameReturns> for BeginFrameReturns
sourcefn eq(&self, other: &BeginFrameReturns) -> bool
fn eq(&self, other: &BeginFrameReturns) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BeginFrameReturns) -> bool
fn ne(&self, other: &BeginFrameReturns) -> bool
This method tests for !=
.
sourceimpl Serialize for BeginFrameReturns
impl Serialize for BeginFrameReturns
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BeginFrameReturns
Auto Trait Implementations
impl RefUnwindSafe for BeginFrameReturns
impl Send for BeginFrameReturns
impl Sync for BeginFrameReturns
impl Unpin for BeginFrameReturns
impl UnwindSafe for BeginFrameReturns
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more