pub struct DocumentParts {
pub lang: String,
pub head: String,
pub head_extra: String,
pub body: Node,
pub nonce: Option<String>,
pub tail: Box<dyn FnOnce(RenderFlags) -> String + Send>,
}Expand description
Everything needed to render a full HTML document.
Fields§
§lang: String§head: StringPre-rendered <head> contents (metadata).
head_extra: StringExtra head markup (e.g. dev scripts). Trusted.
body: Node§nonce: Option<String>CSP nonce applied to framework inline scripts.
tail: Box<dyn FnOnce(RenderFlags) -> String + Send>Called once the body is complete; returns markup appended before
</body> (client runtime scripts, depending on the flags).
Implementations§
Source§impl DocumentParts
impl DocumentParts
pub fn new(body: impl View) -> DocumentParts
Auto Trait Implementations§
impl !RefUnwindSafe for DocumentParts
impl !Sync for DocumentParts
impl !UnwindSafe for DocumentParts
impl Freeze for DocumentParts
impl Send for DocumentParts
impl Unpin for DocumentParts
impl UnsafeUnpin for DocumentParts
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