Struct quickmd::assets::PageState[][src]

pub struct PageState {
    pub scroll_top: f64,
    pub image_widths: HashMap<String, f64>,
    pub image_heights: HashMap<String, f64>,
}
Expand description

The client-side state of the page as the user’s interacted with it. Currently, includes the scroll position and the dimensions of images on the page, so that reloading doesn’t change the viewport.

Fields

scroll_top: f64

Scroll position of the page.

image_widths: HashMap<String, f64>

A cache of all the widths of images in the page, keyed by their URLs.

image_heights: HashMap<String, f64>

A cache of all the heights of images in the page, keyed by their URLs.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. 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

Performs the conversion.

Performs the conversion.

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.