pub struct Dry;
Expand description
A DOM that can only be rendered on the server
Example
Type annotations have been provided for clarity, but the types can be inferred.
let app: P<Dry> = p().text("Hello, world!").into();
assert_eq!(app.freeze().to_string(), "<p>Hello, world!</p>");
Trait Implementations§
source§impl Document for Dry
impl Document for Dry
source§fn mount(
_id: &str,
_element: impl Into<GenericElement<Self, Const>>
) -> MountHandle
fn mount( _id: &str, _element: impl Into<GenericElement<Self, Const>> ) -> MountHandle
Mount an element on the document. Read more
source§fn unmount_all()
fn unmount_all()
Remove all mounted elements. Read more
source§fn mount_in_head(
id: &str,
element: impl Into<GenericElement<Self, Mut>>
) -> bool
fn mount_in_head( id: &str, element: impl Into<GenericElement<Self, Mut>> ) -> bool
Mount an element as a child of
<head>
Read moresource§fn head_inner_html() -> String
fn head_inner_html() -> String
Get the inner HTML of
<head>
. Read moreimpl Dom for Dry
impl InstantiableDom for Dry
Auto Trait Implementations§
impl RefUnwindSafe for Dry
impl Send for Dry
impl Sync for Dry
impl Unpin for Dry
impl UnwindSafe for Dry
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