pub struct BoxModel {
    pub content: ElementQuad,
    pub padding: ElementQuad,
    pub border: ElementQuad,
    pub margin: ElementQuad,
    pub width: f64,
    pub height: f64,
}

Fields§

§content: ElementQuad§padding: ElementQuad§border: ElementQuad§margin: ElementQuad§width: f64§height: f64

Implementations§

Create a page::Viewport equal to the content-box, using a scale of 1.0

Examples found in repository?
src/browser/tab/element/mod.rs (line 449)
441
442
443
444
445
446
447
448
449
450
451
452
    pub fn capture_screenshot(
        &self,
        format: Page::CaptureScreenshotFormatOption,
    ) -> Result<Vec<u8>> {
        self.scroll_into_view()?;
        self.parent.capture_screenshot(
            format,
            Some(90),
            Some(self.get_box_model()?.content_viewport()),
            true,
        )
    }

Create a page::Viewport equal to the padding-box, using a scale of 1.0

Create a page::Viewport equal to the border-box, using a scale of 1.0

Create a page::Viewport equal to the margin-box, using a scale of 1.0

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Get the TypeId of this object.