pub struct Hydro;
Expand description
A DOM that can be rendered on the client or hydrated onto an existing DOM element.
§Example
Type annotations have been provided for clarity, but the types can be inferred.
let app: P<Hydro> = p().text("Hello, world!");
hydrate("app-id", app);
Trait Implementations§
source§impl Document for Hydro
impl Document for Hydro
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
See hydrate
for more details.
hydrate
just calls Hydro::mount
.
type MountInHeadOutput = MountHydroHead
type MountOutput = MountHydro
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 Hydro
impl InstantiableDom for Hydro
Auto Trait Implementations§
impl Freeze for Hydro
impl RefUnwindSafe for Hydro
impl Send for Hydro
impl Sync for Hydro
impl Unpin for Hydro
impl UnwindSafe for Hydro
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