pub struct InlineTextBox { /* private fields */ }Available on crate features
experimental and DOMSnapshot and CSS and DOM and DOMDebugger and Page only.Expand description
Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
Implementations§
Source§impl InlineTextBox
impl InlineTextBox
pub fn new( bounding_box: Rect, start_character_index: u32, num_characters: u32, ) -> Self
Sourcepub fn bounding_box(&self) -> &Rect
pub fn bounding_box(&self) -> &Rect
The bounding box in document coordinates. Note that scroll offset of the document is ignored.
Sourcepub fn start_character_index(&self) -> u32
pub fn start_character_index(&self) -> u32
The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
Sourcepub fn num_characters(&self) -> u32
pub fn num_characters(&self) -> u32
The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
Trait Implementations§
Source§impl Clone for InlineTextBox
impl Clone for InlineTextBox
Source§fn clone(&self) -> InlineTextBox
fn clone(&self) -> InlineTextBox
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 InlineTextBox
impl Debug for InlineTextBox
Source§impl<'de> Deserialize<'de> for InlineTextBox
impl<'de> Deserialize<'de> for InlineTextBox
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 InlineTextBox
impl RefUnwindSafe for InlineTextBox
impl Send for InlineTextBox
impl Sync for InlineTextBox
impl Unpin for InlineTextBox
impl UnwindSafe for InlineTextBox
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