Struct silkenweb::document::DocumentHead
source · pub struct DocumentHead<D: Dom> { /* private fields */ }
Expand description
The document’s <head>
element.
This allows you to create a set of (possibly reactive) children that can be
added to the head. See
hydrate_in_head
for more details.
Implementations§
source§impl<D: Dom> DocumentHead<D>
impl<D: Dom> DocumentHead<D>
sourcepub fn child(
self,
child: impl SignalOrValue<Item = impl Into<GenericElement<D>> + 'static>
) -> Self
pub fn child( self, child: impl SignalOrValue<Item = impl Into<GenericElement<D>> + 'static> ) -> Self
Add a child.
This like ParentElement::child
,
but it only accepts element children, not text.
sourcepub fn optional_child(
self,
child: impl SignalOrValue<Item = Option<impl Into<GenericElement<D>> + 'static>>
) -> Self
pub fn optional_child( self, child: impl SignalOrValue<Item = Option<impl Into<GenericElement<D>> + 'static>> ) -> Self
Add an optional child.
This like ParentElement::optional_child
,
but it only accepts element children, not text.
sourcepub fn children<N>(self, children: impl IntoIterator<Item = N>) -> Selfwhere
N: Into<GenericElement<D>>,
pub fn children<N>(self, children: impl IntoIterator<Item = N>) -> Selfwhere
N: Into<GenericElement<D>>,
Add some children
This like ParentElement::children
,
but it only accepts element children, not text.
sourcepub fn children_signal<E>(
self,
children: impl SignalVec<Item = E> + 'static
) -> Selfwhere
E: Into<GenericElement<D>>,
pub fn children_signal<E>(
self,
children: impl SignalVec<Item = E> + 'static
) -> Selfwhere
E: Into<GenericElement<D>>,
Add some reactive children.
This like ParentElement::children_signal
,
but it only accepts element children, not text.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for DocumentHead<D>
impl<D> !RefUnwindSafe for DocumentHead<D>
impl<D> !Send for DocumentHead<D>
impl<D> !Sync for DocumentHead<D>
impl<D> Unpin for DocumentHead<D>
impl<D> !UnwindSafe for DocumentHead<D>
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