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
type MountInHeadOutput = ()
type MountOutput = ()
source§fn mount(
_id: &str,
_element: impl Into<GenericElement<Self, Const>>
) -> Self::MountOutput
fn mount( _id: &str, _element: impl Into<GenericElement<Self, Const>> ) -> Self::MountOutput
Mount an element on the document. Read more
source§fn mount_in_head(id: &str, head: DocumentHead<Self>) -> Self::MountInHeadOutput
fn mount_in_head(id: &str, head: DocumentHead<Self>) -> Self::MountInHeadOutput
Mount some children in the document
<head>
Read moresource§fn unmount_all()
fn unmount_all()
Remove all mounted elements. Read more
source§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 Freeze for Dry
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more