pub trait InnerHtmlValue: Send {
type AsyncOutput: InnerHtmlValue;
type State;
type Cloneable: InnerHtmlValue + Clone;
type CloneableOwned: InnerHtmlValue + Clone + 'static;
// Required methods
fn html_len(&self) -> usize;
fn to_html(self, buf: &mut String);
fn to_template(buf: &mut String);
fn hydrate<const FROM_SERVER: bool>(self, el: &Element) -> Self::State;
fn build(self, el: &Element) -> Self::State;
fn rebuild(self, state: &mut Self::State);
fn into_cloneable(self) -> Self::Cloneable;
fn into_cloneable_owned(self) -> Self::CloneableOwned;
fn dry_resolve(&mut self);
fn resolve(self) -> impl Future<Output = Self::AsyncOutput> + Send;
}Expand description
A possible value for InnerHtml.
Required Associated Types§
Sourcetype AsyncOutput: InnerHtmlValue
type AsyncOutput: InnerHtmlValue
The type after all async data have resolved.
Sourcetype Cloneable: InnerHtmlValue + Clone
type Cloneable: InnerHtmlValue + Clone
An equivalent value that can be cloned.
Sourcetype CloneableOwned: InnerHtmlValue + Clone + 'static
type CloneableOwned: InnerHtmlValue + Clone + 'static
An equivalent value that can be cloned and is 'static.
Required Methods§
Sourcefn to_template(buf: &mut String)
fn to_template(buf: &mut String)
Renders the class to HTML for a <template>.
Sourcefn hydrate<const FROM_SERVER: bool>(self, el: &Element) -> Self::State
fn hydrate<const FROM_SERVER: bool>(self, el: &Element) -> Self::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a <template>.
Sourcefn build(self, el: &Element) -> Self::State
fn build(self, el: &Element) -> Self::State
Adds this class to the element during client-side rendering.
Sourcefn into_cloneable(self) -> Self::Cloneable
fn into_cloneable(self) -> Self::Cloneable
Converts this to a cloneable type.
Sourcefn into_cloneable_owned(self) -> Self::CloneableOwned
fn into_cloneable_owned(self) -> Self::CloneableOwned
Converts this to a cloneable, owned type.
Sourcefn dry_resolve(&mut self)
fn dry_resolve(&mut self)
“Runs” the attribute without other side effects. For primitive types, this is a no-op. For reactive types, this can be used to gather data about reactivity or about asynchronous data that needs to be loaded.
Sourcefn resolve(self) -> impl Future<Output = Self::AsyncOutput> + Send
fn resolve(self) -> impl Future<Output = Self::AsyncOutput> + Send
“Resolves” this into a type that is not waiting for any asynchronous data.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.