pub struct GetSnapshotReturns<'a> { /* private fields */ }Expand description
Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
Implementations§
Source§impl<'a> GetSnapshotReturns<'a>
impl<'a> GetSnapshotReturns<'a>
Sourcepub fn builder(
dom_nodes: Vec<DOMNode<'a>>,
layout_tree_nodes: Vec<LayoutTreeNode<'a>>,
computed_styles: Vec<ComputedStyle<'a>>,
) -> GetSnapshotReturnsBuilder<'a>
pub fn builder( dom_nodes: Vec<DOMNode<'a>>, layout_tree_nodes: Vec<LayoutTreeNode<'a>>, computed_styles: Vec<ComputedStyle<'a>>, ) -> GetSnapshotReturnsBuilder<'a>
Creates a builder for this type with the required parameters:
dom_nodes: The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.layout_tree_nodes: The nodes in the layout tree.computed_styles: Whitelisted ComputedStyle properties for each node in the layout tree.
Sourcepub fn dom_nodes(&self) -> &[DOMNode<'a>]
pub fn dom_nodes(&self) -> &[DOMNode<'a>]
The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
Sourcepub fn layout_tree_nodes(&self) -> &[LayoutTreeNode<'a>]
pub fn layout_tree_nodes(&self) -> &[LayoutTreeNode<'a>]
The nodes in the layout tree.
Sourcepub fn computed_styles(&self) -> &[ComputedStyle<'a>]
pub fn computed_styles(&self) -> &[ComputedStyle<'a>]
Whitelisted ComputedStyle properties for each node in the layout tree.
Trait Implementations§
Source§impl<'a> Clone for GetSnapshotReturns<'a>
impl<'a> Clone for GetSnapshotReturns<'a>
Source§fn clone(&self) -> GetSnapshotReturns<'a>
fn clone(&self) -> GetSnapshotReturns<'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 GetSnapshotReturns<'a>
impl<'a> Debug for GetSnapshotReturns<'a>
Source§impl<'a> Default for GetSnapshotReturns<'a>
impl<'a> Default for GetSnapshotReturns<'a>
Source§fn default() -> GetSnapshotReturns<'a>
fn default() -> GetSnapshotReturns<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for GetSnapshotReturns<'a>
impl<'de, 'a> Deserialize<'de> for GetSnapshotReturns<'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 GetSnapshotReturns<'a>
impl<'a> RefUnwindSafe for GetSnapshotReturns<'a>
impl<'a> Send for GetSnapshotReturns<'a>
impl<'a> Sync for GetSnapshotReturns<'a>
impl<'a> Unpin for GetSnapshotReturns<'a>
impl<'a> UnsafeUnpin for GetSnapshotReturns<'a>
impl<'a> UnwindSafe for GetSnapshotReturns<'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