pub struct BeginFrameParams {
pub frame_time_ticks: Option<f64>,
pub interval: Option<f64>,
pub no_display_updates: Option<bool>,
pub screenshot: Option<ScreenshotParams>,
}
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. beginFrame
Fields§
§frame_time_ticks: Option<f64>
Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
interval: Option<f64>
The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
no_display_updates: Option<bool>
Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
screenshot: Option<ScreenshotParams>
If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
Implementations§
Source§impl BeginFrameParams
impl BeginFrameParams
pub fn builder() -> BeginFrameParamsBuilder
Source§impl BeginFrameParams
impl BeginFrameParams
pub const IDENTIFIER: &'static str = "HeadlessExperimental.beginFrame"
Trait Implementations§
Source§impl Clone for BeginFrameParams
impl Clone for BeginFrameParams
Source§fn clone(&self) -> BeginFrameParams
fn clone(&self) -> BeginFrameParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Command for BeginFrameParams
impl Command for BeginFrameParams
Source§impl Debug for BeginFrameParams
impl Debug for BeginFrameParams
Source§impl Default for BeginFrameParams
impl Default for BeginFrameParams
Source§fn default() -> BeginFrameParams
fn default() -> BeginFrameParams
Source§impl<'de> Deserialize<'de> for BeginFrameParams
impl<'de> Deserialize<'de> for BeginFrameParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BeginFrameParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BeginFrameParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Method for BeginFrameParams
impl Method for BeginFrameParams
Source§fn identifier(&self) -> Cow<'static, str>
fn identifier(&self) -> Cow<'static, str>
DOM.removeNode
Source§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
DOM
Source§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
removeNode
Source§impl MethodType for BeginFrameParams
impl MethodType for BeginFrameParams
Source§impl PartialEq for BeginFrameParams
impl PartialEq for BeginFrameParams
Source§impl Serialize for BeginFrameParams
impl Serialize for BeginFrameParams
Source§fn 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,
impl StructuralPartialEq for BeginFrameParams
Auto Trait Implementations§
impl Freeze for BeginFrameParams
impl RefUnwindSafe for BeginFrameParams
impl Send for BeginFrameParams
impl Sync for BeginFrameParams
impl Unpin for BeginFrameParams
impl UnwindSafe for BeginFrameParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more