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
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 RefUnwindSafe for PageState
impl UnwindSafe for PageState