Struct View
pub struct View<T = SsrNode> { /* private fields */ }
Expand description
Represents a view tree.
Internally, this stores a list of nodes. This is the main type that is returned from components.
Implementations§
§impl<T> View<T>
impl<T> View<T>
pub fn from_nodes(nodes: Vec<T>) -> View<T>
pub fn from_nodes(nodes: Vec<T>) -> View<T>
Create a new view with multiple nodes.
pub fn from_dynamic<U>(f: impl FnMut() -> U + 'static) -> View<T>
pub fn from_dynamic<U>(f: impl FnMut() -> U + 'static) -> View<T>
Create a new view from a function that returns a view. An alias to
ViewNode::create_dynamic_view
.
pub fn as_web_sys(&self) -> Vec<Node>where
T: ViewHtmlNode,
pub fn as_web_sys(&self) -> Vec<Node>where
T: ViewHtmlNode,
Create a flat list of all the web-sys nodes in the view.
Trait Implementations§
§impl<T> From<&'static str> for View<T>where
T: ViewHtmlNode,
impl<T> From<&'static str> for View<T>where
T: ViewHtmlNode,
§impl<U, A, B, C, D> From<(A, B, C, D)> for View<U>
impl<U, A, B, C, D> From<(A, B, C, D)> for View<U>
§fn from(t: (A, B, C, D)) -> View<U>
fn from(t: (A, B, C, D)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E> From<(A, B, C, D, E)> for View<U>
impl<U, A, B, C, D, E> From<(A, B, C, D, E)> for View<U>
§fn from(t: (A, B, C, D, E)) -> View<U>
fn from(t: (A, B, C, D, E)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E, F> From<(A, B, C, D, E, F)> for View<U>
impl<U, A, B, C, D, E, F> From<(A, B, C, D, E, F)> for View<U>
§fn from(t: (A, B, C, D, E, F)) -> View<U>
fn from(t: (A, B, C, D, E, F)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E, F, G> From<(A, B, C, D, E, F, G)> for View<U>
impl<U, A, B, C, D, E, F, G> From<(A, B, C, D, E, F, G)> for View<U>
§fn from(t: (A, B, C, D, E, F, G)) -> View<U>
fn from(t: (A, B, C, D, E, F, G)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E, F, G, H> From<(A, B, C, D, E, F, G, H)> for View<U>
impl<U, A, B, C, D, E, F, G, H> From<(A, B, C, D, E, F, G, H)> for View<U>
§fn from(t: (A, B, C, D, E, F, G, H)) -> View<U>
fn from(t: (A, B, C, D, E, F, G, H)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E, F, G, H, I> From<(A, B, C, D, E, F, G, H, I)> for View<U>
impl<U, A, B, C, D, E, F, G, H, I> From<(A, B, C, D, E, F, G, H, I)> for View<U>
§fn from(t: (A, B, C, D, E, F, G, H, I)) -> View<U>
fn from(t: (A, B, C, D, E, F, G, H, I)) -> View<U>
Converts to this type from the input type.
§impl<U, A, B, C, D, E, F, G, H, I, J> From<(A, B, C, D, E, F, G, H, I, J)> for View<U>
impl<U, A, B, C, D, E, F, G, H, I, J> From<(A, B, C, D, E, F, G, H, I, J)> for View<U>
§fn from(t: (A, B, C, D, E, F, G, H, I, J)) -> View<U>
fn from(t: (A, B, C, D, E, F, G, H, I, J)) -> View<U>
Converts to this type from the input type.
§impl From<CustomElement> for View
impl From<CustomElement> for View
§fn from(el: CustomElement) -> View
fn from(el: CustomElement) -> View
Converts to this type from the input type.
§impl From<HtmlAddress> for View
impl From<HtmlAddress> for View
§fn from(el: HtmlAddress) -> View
fn from(el: HtmlAddress) -> View
Converts to this type from the input type.
§impl From<HtmlArticle> for View
impl From<HtmlArticle> for View
§fn from(el: HtmlArticle) -> View
fn from(el: HtmlArticle) -> View
Converts to this type from the input type.
§impl From<HtmlBlockquote> for View
impl From<HtmlBlockquote> for View
§fn from(el: HtmlBlockquote) -> View
fn from(el: HtmlBlockquote) -> View
Converts to this type from the input type.
§impl From<HtmlButton> for View
impl From<HtmlButton> for View
§fn from(el: HtmlButton) -> View
fn from(el: HtmlButton) -> View
Converts to this type from the input type.
§impl From<HtmlCanvas> for View
impl From<HtmlCanvas> for View
§fn from(el: HtmlCanvas) -> View
fn from(el: HtmlCanvas) -> View
Converts to this type from the input type.
§impl From<HtmlCaption> for View
impl From<HtmlCaption> for View
§fn from(el: HtmlCaption) -> View
fn from(el: HtmlCaption) -> View
Converts to this type from the input type.
§impl From<HtmlColgroup> for View
impl From<HtmlColgroup> for View
§fn from(el: HtmlColgroup) -> View
fn from(el: HtmlColgroup) -> View
Converts to this type from the input type.
§impl From<HtmlDatalist> for View
impl From<HtmlDatalist> for View
§fn from(el: HtmlDatalist) -> View
fn from(el: HtmlDatalist) -> View
Converts to this type from the input type.
§impl From<HtmlDetails> for View
impl From<HtmlDetails> for View
§fn from(el: HtmlDetails) -> View
fn from(el: HtmlDetails) -> View
Converts to this type from the input type.
§impl From<HtmlDialog> for View
impl From<HtmlDialog> for View
§fn from(el: HtmlDialog) -> View
fn from(el: HtmlDialog) -> View
Converts to this type from the input type.
§impl From<HtmlFieldset> for View
impl From<HtmlFieldset> for View
§fn from(el: HtmlFieldset) -> View
fn from(el: HtmlFieldset) -> View
Converts to this type from the input type.
§fn from(el: HtmlFigcaption) -> View
fn from(el: HtmlFigcaption) -> View
Converts to this type from the input type.
§impl From<HtmlFigure> for View
impl From<HtmlFigure> for View
§fn from(el: HtmlFigure) -> View
fn from(el: HtmlFigure) -> View
Converts to this type from the input type.
§fn from(el: HtmlFooter) -> View
fn from(el: HtmlFooter) -> View
Converts to this type from the input type.
§impl From<HtmlHeader> for View
impl From<HtmlHeader> for View
§fn from(el: HtmlHeader) -> View
fn from(el: HtmlHeader) -> View
Converts to this type from the input type.
§impl From<HtmlHgroup> for View
impl From<HtmlHgroup> for View
§fn from(el: HtmlHgroup) -> View
fn from(el: HtmlHgroup) -> View
Converts to this type from the input type.
§impl From<HtmlIframe> for View
impl From<HtmlIframe> for View
§fn from(el: HtmlIframe) -> View
fn from(el: HtmlIframe) -> View
Converts to this type from the input type.
§impl From<HtmlKeygen> for View
impl From<HtmlKeygen> for View
§fn from(el: HtmlKeygen) -> View
fn from(el: HtmlKeygen) -> View
Converts to this type from the input type.
§impl From<HtmlLegend> for View
impl From<HtmlLegend> for View
§fn from(el: HtmlLegend) -> View
fn from(el: HtmlLegend) -> View
Converts to this type from the input type.
§impl From<HtmlMenuitem> for View
impl From<HtmlMenuitem> for View
§fn from(el: HtmlMenuitem) -> View
fn from(el: HtmlMenuitem) -> View
Converts to this type from the input type.
§impl From<HtmlNoscript> for View
impl From<HtmlNoscript> for View
§fn from(el: HtmlNoscript) -> View
fn from(el: HtmlNoscript) -> View
Converts to this type from the input type.
§impl From<HtmlObject> for View
impl From<HtmlObject> for View
§fn from(el: HtmlObject) -> View
fn from(el: HtmlObject) -> View
Converts to this type from the input type.
§impl From<HtmlOptgroup> for View
impl From<HtmlOptgroup> for View
§fn from(el: HtmlOptgroup) -> View
fn from(el: HtmlOptgroup) -> View
Converts to this type from the input type.
§impl From<HtmlOption> for View
impl From<HtmlOption> for View
§fn from(el: HtmlOption) -> View
fn from(el: HtmlOption) -> View
Converts to this type from the input type.
§impl From<HtmlOutput> for View
impl From<HtmlOutput> for View
§fn from(el: HtmlOutput) -> View
fn from(el: HtmlOutput) -> View
Converts to this type from the input type.
§impl From<HtmlPicture> for View
impl From<HtmlPicture> for View
§fn from(el: HtmlPicture) -> View
fn from(el: HtmlPicture) -> View
Converts to this type from the input type.
§impl From<HtmlProgress> for View
impl From<HtmlProgress> for View
§fn from(el: HtmlProgress) -> View
fn from(el: HtmlProgress) -> View
Converts to this type from the input type.
§impl From<HtmlScript> for View
impl From<HtmlScript> for View
§fn from(el: HtmlScript) -> View
fn from(el: HtmlScript) -> View
Converts to this type from the input type.
§impl From<HtmlSection> for View
impl From<HtmlSection> for View
§fn from(el: HtmlSection) -> View
fn from(el: HtmlSection) -> View
Converts to this type from the input type.
§impl From<HtmlSelect> for View
impl From<HtmlSelect> for View
§fn from(el: HtmlSelect) -> View
fn from(el: HtmlSelect) -> View
Converts to this type from the input type.
§impl From<HtmlSource> for View
impl From<HtmlSource> for View
§fn from(el: HtmlSource) -> View
fn from(el: HtmlSource) -> View
Converts to this type from the input type.
§impl From<HtmlStrong> for View
impl From<HtmlStrong> for View
§fn from(el: HtmlStrong) -> View
fn from(el: HtmlStrong) -> View
Converts to this type from the input type.
§impl From<HtmlSummary> for View
impl From<HtmlSummary> for View
§fn from(el: HtmlSummary) -> View
fn from(el: HtmlSummary) -> View
Converts to this type from the input type.
§impl From<HtmlTemplate> for View
impl From<HtmlTemplate> for View
§fn from(el: HtmlTemplate) -> View
fn from(el: HtmlTemplate) -> View
Converts to this type from the input type.
§impl From<HtmlTextarea> for View
impl From<HtmlTextarea> for View
§fn from(el: HtmlTextarea) -> View
fn from(el: HtmlTextarea) -> View
Converts to this type from the input type.
§impl<T> From<String> for View<T>where
T: ViewHtmlNode,
impl<T> From<String> for View<T>where
T: ViewHtmlNode,
§impl From<SvgAnimate> for View
impl From<SvgAnimate> for View
§fn from(el: SvgAnimate) -> View
fn from(el: SvgAnimate) -> View
Converts to this type from the input type.
§impl From<SvgAnimateMotion> for View
impl From<SvgAnimateMotion> for View
§fn from(el: SvgAnimateMotion) -> View
fn from(el: SvgAnimateMotion) -> View
Converts to this type from the input type.
§impl From<SvgAnimateTransform> for View
impl From<SvgAnimateTransform> for View
§fn from(el: SvgAnimateTransform) -> View
fn from(el: SvgAnimateTransform) -> View
Converts to this type from the input type.
§impl From<SvgClipPath> for View
impl From<SvgClipPath> for View
§fn from(el: SvgClipPath) -> View
fn from(el: SvgClipPath) -> View
Converts to this type from the input type.
§impl From<SvgDiscard> for View
impl From<SvgDiscard> for View
§fn from(el: SvgDiscard) -> View
fn from(el: SvgDiscard) -> View
Converts to this type from the input type.
§impl From<SvgEllipse> for View
impl From<SvgEllipse> for View
§fn from(el: SvgEllipse) -> View
fn from(el: SvgEllipse) -> View
Converts to this type from the input type.
§impl From<SvgFeBlend> for View
impl From<SvgFeBlend> for View
§fn from(el: SvgFeBlend) -> View
fn from(el: SvgFeBlend) -> View
Converts to this type from the input type.
§impl From<SvgFeColorMatrix> for View
impl From<SvgFeColorMatrix> for View
§fn from(el: SvgFeColorMatrix) -> View
fn from(el: SvgFeColorMatrix) -> View
Converts to this type from the input type.
§impl From<SvgFeComponentTransfer> for View
impl From<SvgFeComponentTransfer> for View
§fn from(el: SvgFeComponentTransfer) -> View
fn from(el: SvgFeComponentTransfer) -> View
Converts to this type from the input type.
§impl From<SvgFeComposite> for View
impl From<SvgFeComposite> for View
§fn from(el: SvgFeComposite) -> View
fn from(el: SvgFeComposite) -> View
Converts to this type from the input type.
§impl From<SvgFeConvolveMatrix> for View
impl From<SvgFeConvolveMatrix> for View
§fn from(el: SvgFeConvolveMatrix) -> View
fn from(el: SvgFeConvolveMatrix) -> View
Converts to this type from the input type.
§impl From<SvgFeDiffuseLighting> for View
impl From<SvgFeDiffuseLighting> for View
§fn from(el: SvgFeDiffuseLighting) -> View
fn from(el: SvgFeDiffuseLighting) -> View
Converts to this type from the input type.
§impl From<SvgFeDisplacementMap> for View
impl From<SvgFeDisplacementMap> for View
§fn from(el: SvgFeDisplacementMap) -> View
fn from(el: SvgFeDisplacementMap) -> View
Converts to this type from the input type.
§impl From<SvgFeDistantLight> for View
impl From<SvgFeDistantLight> for View
§fn from(el: SvgFeDistantLight) -> View
fn from(el: SvgFeDistantLight) -> View
Converts to this type from the input type.
§impl From<SvgFeDropShadow> for View
impl From<SvgFeDropShadow> for View
§fn from(el: SvgFeDropShadow) -> View
fn from(el: SvgFeDropShadow) -> View
Converts to this type from the input type.
§impl From<SvgFeFlood> for View
impl From<SvgFeFlood> for View
§fn from(el: SvgFeFlood) -> View
fn from(el: SvgFeFlood) -> View
Converts to this type from the input type.
§impl From<SvgFeFuncA> for View
impl From<SvgFeFuncA> for View
§fn from(el: SvgFeFuncA) -> View
fn from(el: SvgFeFuncA) -> View
Converts to this type from the input type.
§impl From<SvgFeFuncB> for View
impl From<SvgFeFuncB> for View
§fn from(el: SvgFeFuncB) -> View
fn from(el: SvgFeFuncB) -> View
Converts to this type from the input type.
§impl From<SvgFeFuncG> for View
impl From<SvgFeFuncG> for View
§fn from(el: SvgFeFuncG) -> View
fn from(el: SvgFeFuncG) -> View
Converts to this type from the input type.
§impl From<SvgFeFuncR> for View
impl From<SvgFeFuncR> for View
§fn from(el: SvgFeFuncR) -> View
fn from(el: SvgFeFuncR) -> View
Converts to this type from the input type.
§impl From<SvgFeGaussianBlur> for View
impl From<SvgFeGaussianBlur> for View
§fn from(el: SvgFeGaussianBlur) -> View
fn from(el: SvgFeGaussianBlur) -> View
Converts to this type from the input type.
§impl From<SvgFeImage> for View
impl From<SvgFeImage> for View
§fn from(el: SvgFeImage) -> View
fn from(el: SvgFeImage) -> View
Converts to this type from the input type.
§impl From<SvgFeMerge> for View
impl From<SvgFeMerge> for View
§fn from(el: SvgFeMerge) -> View
fn from(el: SvgFeMerge) -> View
Converts to this type from the input type.
§impl From<SvgFeMergeNode> for View
impl From<SvgFeMergeNode> for View
§fn from(el: SvgFeMergeNode) -> View
fn from(el: SvgFeMergeNode) -> View
Converts to this type from the input type.
§impl From<SvgFeMorphology> for View
impl From<SvgFeMorphology> for View
§fn from(el: SvgFeMorphology) -> View
fn from(el: SvgFeMorphology) -> View
Converts to this type from the input type.
§impl From<SvgFeOffset> for View
impl From<SvgFeOffset> for View
§fn from(el: SvgFeOffset) -> View
fn from(el: SvgFeOffset) -> View
Converts to this type from the input type.
§impl From<SvgFePointLight> for View
impl From<SvgFePointLight> for View
§fn from(el: SvgFePointLight) -> View
fn from(el: SvgFePointLight) -> View
Converts to this type from the input type.
§impl From<SvgFeSpecularLighting> for View
impl From<SvgFeSpecularLighting> for View
§fn from(el: SvgFeSpecularLighting) -> View
fn from(el: SvgFeSpecularLighting) -> View
Converts to this type from the input type.
§impl From<SvgFeSpotLight> for View
impl From<SvgFeSpotLight> for View
§fn from(el: SvgFeSpotLight) -> View
fn from(el: SvgFeSpotLight) -> View
Converts to this type from the input type.
§impl From<SvgFeTurbulence> for View
impl From<SvgFeTurbulence> for View
§fn from(el: SvgFeTurbulence) -> View
fn from(el: SvgFeTurbulence) -> View
Converts to this type from the input type.
§impl From<SvgForeignObject> for View
impl From<SvgForeignObject> for View
§fn from(el: SvgForeignObject) -> View
fn from(el: SvgForeignObject) -> View
Converts to this type from the input type.
§impl From<SvgHatchpath> for View
impl From<SvgHatchpath> for View
§fn from(el: SvgHatchpath) -> View
fn from(el: SvgHatchpath) -> View
Converts to this type from the input type.
§impl From<SvgLinearGradient> for View
impl From<SvgLinearGradient> for View
§fn from(el: SvgLinearGradient) -> View
fn from(el: SvgLinearGradient) -> View
Converts to this type from the input type.
§impl From<SvgMetadata> for View
impl From<SvgMetadata> for View
§fn from(el: SvgMetadata) -> View
fn from(el: SvgMetadata) -> View
Converts to this type from the input type.
§impl From<SvgPattern> for View
impl From<SvgPattern> for View
§fn from(el: SvgPattern) -> View
fn from(el: SvgPattern) -> View
Converts to this type from the input type.
§impl From<SvgPolygon> for View
impl From<SvgPolygon> for View
§fn from(el: SvgPolygon) -> View
fn from(el: SvgPolygon) -> View
Converts to this type from the input type.
§impl From<SvgPolyline> for View
impl From<SvgPolyline> for View
§fn from(el: SvgPolyline) -> View
fn from(el: SvgPolyline) -> View
Converts to this type from the input type.
§impl From<SvgRadialGradient> for View
impl From<SvgRadialGradient> for View
§fn from(el: SvgRadialGradient) -> View
fn from(el: SvgRadialGradient) -> View
Converts to this type from the input type.
§impl From<SvgSvgScript> for View
impl From<SvgSvgScript> for View
§fn from(el: SvgSvgScript) -> View
fn from(el: SvgSvgScript) -> View
Converts to this type from the input type.
§impl From<SvgSvgStyle> for View
impl From<SvgSvgStyle> for View
§fn from(el: SvgSvgStyle) -> View
fn from(el: SvgSvgStyle) -> View
Converts to this type from the input type.
§impl From<SvgSvgTitle> for View
impl From<SvgSvgTitle> for View
§fn from(el: SvgSvgTitle) -> View
fn from(el: SvgSvgTitle) -> View
Converts to this type from the input type.
§impl From<SvgTextPath> for View
impl From<SvgTextPath> for View
§fn from(el: SvgTextPath) -> View
fn from(el: SvgTextPath) -> View
Converts to this type from the input type.
§impl<T> From<f32> for View<T>where
T: ViewHtmlNode,
impl<T> From<f32> for View<T>where
T: ViewHtmlNode,
§impl<T> From<f64> for View<T>where
T: ViewHtmlNode,
impl<T> From<f64> for View<T>where
T: ViewHtmlNode,
§impl<T> From<i128> for View<T>where
T: ViewHtmlNode,
impl<T> From<i128> for View<T>where
T: ViewHtmlNode,
§impl<T> From<i16> for View<T>where
T: ViewHtmlNode,
impl<T> From<i16> for View<T>where
T: ViewHtmlNode,
§impl<T> From<i32> for View<T>where
T: ViewHtmlNode,
impl<T> From<i32> for View<T>where
T: ViewHtmlNode,
§impl<T> From<i64> for View<T>where
T: ViewHtmlNode,
impl<T> From<i64> for View<T>where
T: ViewHtmlNode,
§impl<T> From<i8> for View<T>where
T: ViewHtmlNode,
impl<T> From<i8> for View<T>where
T: ViewHtmlNode,
§impl<T> From<isize> for View<T>where
T: ViewHtmlNode,
impl<T> From<isize> for View<T>where
T: ViewHtmlNode,
§impl<T> From<u128> for View<T>where
T: ViewHtmlNode,
impl<T> From<u128> for View<T>where
T: ViewHtmlNode,
§impl<T> From<u16> for View<T>where
T: ViewHtmlNode,
impl<T> From<u16> for View<T>where
T: ViewHtmlNode,
§impl<T> From<u32> for View<T>where
T: ViewHtmlNode,
impl<T> From<u32> for View<T>where
T: ViewHtmlNode,
§impl<T> From<u64> for View<T>where
T: ViewHtmlNode,
impl<T> From<u64> for View<T>where
T: ViewHtmlNode,
§impl<T> From<u8> for View<T>where
T: ViewHtmlNode,
impl<T> From<u8> for View<T>where
T: ViewHtmlNode,
Auto Trait Implementations§
impl<T> Freeze for View<T>where
T: Freeze,
impl<T> RefUnwindSafe for View<T>where
T: RefUnwindSafe,
impl<T> Send for View<T>where
T: Send,
impl<T> Sync for View<T>where
T: Sync,
impl<T> Unpin for View<T>where
T: Unpin,
impl<T> UnwindSafe for View<T>where
T: RefUnwindSafe + UnwindSafe,
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