pub struct DocumentSnapshot { /* private fields */ }Expand description
Document snapshot.
Implementations§
Source§impl DocumentSnapshot
impl DocumentSnapshot
Sourcepub fn builder(
document_url: StringIndex,
title: StringIndex,
base_url: StringIndex,
content_language: StringIndex,
encoding_name: StringIndex,
public_id: StringIndex,
system_id: StringIndex,
frame_id: StringIndex,
nodes: NodeTreeSnapshot,
layout: LayoutTreeSnapshot,
text_boxes: TextBoxSnapshot,
) -> DocumentSnapshotBuilder
pub fn builder( document_url: StringIndex, title: StringIndex, base_url: StringIndex, content_language: StringIndex, encoding_name: StringIndex, public_id: StringIndex, system_id: StringIndex, frame_id: StringIndex, nodes: NodeTreeSnapshot, layout: LayoutTreeSnapshot, text_boxes: TextBoxSnapshot, ) -> DocumentSnapshotBuilder
Creates a builder for this type with the required parameters:
document_url: Document URL thatDocumentorFrameOwnernode points to.title: Document title.base_url: Base URL thatDocumentorFrameOwnernode uses for URL completion.content_language: Contains the document’s content language.encoding_name: Contains the document’s character set encoding.public_id:DocumentTypenode’s publicId.system_id:DocumentTypenode’s systemId.frame_id: Frame ID for frame owner elements and also for the document node.nodes: A table with dom nodes.layout: The nodes in the layout tree.text_boxes: The post-layout inline text nodes.
Sourcepub fn document_url(&self) -> &StringIndex
pub fn document_url(&self) -> &StringIndex
Document URL that ‘Document’ or ‘FrameOwner’ node points to.
Sourcepub fn title(&self) -> &StringIndex
pub fn title(&self) -> &StringIndex
Document title.
Sourcepub fn base_url(&self) -> &StringIndex
pub fn base_url(&self) -> &StringIndex
Base URL that ‘Document’ or ‘FrameOwner’ node uses for URL completion.
Sourcepub fn content_language(&self) -> &StringIndex
pub fn content_language(&self) -> &StringIndex
Contains the document’s content language.
Sourcepub fn encoding_name(&self) -> &StringIndex
pub fn encoding_name(&self) -> &StringIndex
Contains the document’s character set encoding.
Sourcepub fn public_id(&self) -> &StringIndex
pub fn public_id(&self) -> &StringIndex
‘DocumentType’ node’s publicId.
Sourcepub fn system_id(&self) -> &StringIndex
pub fn system_id(&self) -> &StringIndex
‘DocumentType’ node’s systemId.
Sourcepub fn frame_id(&self) -> &StringIndex
pub fn frame_id(&self) -> &StringIndex
Frame ID for frame owner elements and also for the document node.
Sourcepub fn nodes(&self) -> &NodeTreeSnapshot
pub fn nodes(&self) -> &NodeTreeSnapshot
A table with dom nodes.
Sourcepub fn layout(&self) -> &LayoutTreeSnapshot
pub fn layout(&self) -> &LayoutTreeSnapshot
The nodes in the layout tree.
Sourcepub fn text_boxes(&self) -> &TextBoxSnapshot
pub fn text_boxes(&self) -> &TextBoxSnapshot
The post-layout inline text nodes.
Sourcepub fn scroll_offset_x(&self) -> Option<f64>
pub fn scroll_offset_x(&self) -> Option<f64>
Horizontal scroll offset.
Sourcepub fn scroll_offset_y(&self) -> Option<f64>
pub fn scroll_offset_y(&self) -> Option<f64>
Vertical scroll offset.
Sourcepub fn content_width(&self) -> Option<f64>
pub fn content_width(&self) -> Option<f64>
Document content width.
Sourcepub fn content_height(&self) -> Option<f64>
pub fn content_height(&self) -> Option<f64>
Document content height.
Trait Implementations§
Source§impl Clone for DocumentSnapshot
impl Clone for DocumentSnapshot
Source§fn clone(&self) -> DocumentSnapshot
fn clone(&self) -> DocumentSnapshot
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 Debug for DocumentSnapshot
impl Debug for DocumentSnapshot
Source§impl Default for DocumentSnapshot
impl Default for DocumentSnapshot
Source§fn default() -> DocumentSnapshot
fn default() -> DocumentSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DocumentSnapshot
impl<'de> Deserialize<'de> for DocumentSnapshot
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 DocumentSnapshot
impl RefUnwindSafe for DocumentSnapshot
impl Send for DocumentSnapshot
impl Sync for DocumentSnapshot
impl Unpin for DocumentSnapshot
impl UnsafeUnpin for DocumentSnapshot
impl UnwindSafe for DocumentSnapshot
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