Struct ChildrenRenderer

Source
pub struct ChildrenRenderer<T> { /* private fields */ }
Expand description

A type used for rendering children html.

Implementationsยง

Sourceยง

impl<T> ChildrenRenderer<T>
where T: Clone,

Source

pub fn new(children: Vec<T>) -> ChildrenRenderer<T>

Create children

Source

pub fn is_empty(&self) -> bool

Children list is empty

Source

pub fn len(&self) -> usize

Number of children elements

Source

pub fn iter(&self) -> impl Iterator<Item = T>

Render children components and return Iterator

Source

pub fn map<OUT>(&self, closure: impl FnOnce(&ChildrenRenderer<T>) -> OUT) -> OUT
where OUT: Default,

Convert the children elements to another object (if there are any).

children.map(|children| {
    html! {
        <div class={classes!("container")}>
            {children}
        </div>
    }
})

Trait Implementationsยง

Sourceยง

impl<T> Clone for ChildrenRenderer<T>
where T: Clone,

Sourceยง

fn clone(&self) -> ChildrenRenderer<T>

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl<T> Debug for ChildrenRenderer<T>

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Sourceยง

impl<T> Default for ChildrenRenderer<T>

Sourceยง

fn default() -> ChildrenRenderer<T>

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<COMP> From<ChildrenRenderer<VChild<COMP>>> for ChildrenRenderer<VNode>
where COMP: BaseComponent,

Sourceยง

fn from(value: ChildrenRenderer<VChild<COMP>>) -> ChildrenRenderer<VNode>

Converts to this type from the input type.
Sourceยง

impl From<ChildrenRenderer<VNode>> for VNode

Sourceยง

fn from(val: ChildrenRenderer<VNode>) -> VNode

Converts to this type from the input type.
Sourceยง

impl<T> IntoIterator for ChildrenRenderer<T>

Sourceยง

type IntoIter = IntoIter<<ChildrenRenderer<T> as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Sourceยง

type Item = T

The type of the elements being iterated over.
Sourceยง

fn into_iter(self) -> <ChildrenRenderer<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Sourceยง

impl<T, C> IntoPropValue<ChildrenRenderer<C>> for VChild<T>
where T: BaseComponent, C: Clone + Into<VNode>, VChild<T>: Into<C>,

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<C>

Convert self to a value of a Properties struct.
Sourceยง

impl<T, R> IntoPropValue<ChildrenRenderer<R>> for Vec<T>
where T: Into<R>, R: Clone + Into<VNode>,

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<R>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for &str

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for Arc<String>

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for Arc<str>

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for Cow<'_, str>

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for IString

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for Rc<String>

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for Rc<str>

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for String

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for VNode

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for VText

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for bool

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for char

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for f32

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for f64

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for i128

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for i16

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for i32

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for i64

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for i8

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for isize

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for u128

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for u16

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for u32

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for u64

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for u8

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl IntoPropValue<ChildrenRenderer<VNode>> for usize

Sourceยง

fn into_prop_value(self) -> ChildrenRenderer<VNode>

Convert self to a value of a Properties struct.
Sourceยง

impl<T> PartialEq for ChildrenRenderer<T>
where T: PartialEq,

Sourceยง

fn eq(&self, other: &ChildrenRenderer<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl ToHtml for ChildrenRenderer<VNode>

Sourceยง

fn to_html(&self) -> VNode

Converts this type to a Html.
Sourceยง

fn into_html(self) -> VNode

Converts this type into a Html.

Auto Trait Implementationsยง

ยง

impl<T> Freeze for ChildrenRenderer<T>

ยง

impl<T> RefUnwindSafe for ChildrenRenderer<T>
where T: RefUnwindSafe,

ยง

impl<T> Send for ChildrenRenderer<T>
where T: Send,

ยง

impl<T> Sync for ChildrenRenderer<T>
where T: Sync,

ยง

impl<T> Unpin for ChildrenRenderer<T>
where T: Unpin,

ยง

impl<T> UnwindSafe for ChildrenRenderer<T>
where T: UnwindSafe,

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoPropValue<Option<T>> for T

Sourceยง

fn into_prop_value(self) -> Option<T>

Convert self to a value of a Properties struct.
Sourceยง

impl<T> IntoPropValue<T> for T

Sourceยง

fn into_prop_value(self) -> T

Convert self to a value of a Properties struct.
Sourceยง

impl<T> IntoPropValue<VNode> for T
where T: ToHtml,

Sourceยง

fn into_prop_value(self) -> VNode

Convert self to a value of a Properties struct.
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<Token, Builder, How> AllPropsFor<Builder, How> for Token
where Builder: Buildable<Token>, <Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,

Sourceยง

impl<T> HasAllProps<(), T> for T