pub struct PageData {
pub content: String,
pub state: Value,
pub widget_states: HashMap<PathMaybeWithLocale, Result<Value, ServerErrorData>>,
pub head: String,
}
Expand description
Represents the data necessary to render a page, including document metadata.
Fields§
§content: String
Prerendered HTML content.
state: Value
The state for hydration.
widget_states: HashMap<PathMaybeWithLocale, Result<Value, ServerErrorData>>
The states of all the widgets involved in rendering this page. This will not include the states of delayed widgets. Each state here is fallible with a client error, since any errors in widgets will simply affect their own load, not that of the wider page.
This is a map of widget path to capsule name and state, preventing the need to run route resolution algorithms on the browser-side.
head: String
The string to interpolate into the document’s <head>
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for PageData
impl<'de> Deserialize<'de> for PageData
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 RefUnwindSafe for PageData
impl Send for PageData
impl Sync for PageData
impl Unpin for PageData
impl UnwindSafe for PageData
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