pub struct ComponentTemplateArtifact {
pub tag_name: String,
pub template: String,
pub template_json: String,
pub template_functions: String,
pub hydration: StateSurface,
pub navigation: StateSurface,
pub template_roots: Vec<String>,
pub is_scripted: bool,
pub uses_shadow_dom: bool,
}Expand description
Client template payload generated by a parser plugin for one component.
Fields§
§tag_name: StringComponent custom-element tag name.
template: StringPlugin-owned client template payload.
template_json: StringWebUI JSON-safe template metadata.
template_functions: StringWebUI component-local JavaScript condition closure array.
hydration: StateSurfaceInitial hydration state surface derived by the producing plugin.
Partial-navigation state surface derived by the producing plugin.
template_roots: Vec<String>Compiled template roots — the reactive property names referenced
directly by the template (e.g. {{name}}) independent of any
authored client script. Always populated (possibly empty), even when
hydration/navigation collapse to StateSurface::All, so a
bundler-neutral manifest consumer can union exact client keys with
these Rust-derived roots without re-deriving them.
is_scripted: boolWhether this component has an authored client module (sibling script or an externally client-owned package), as opposed to a scriptless compiled template. Bundler manifest coverage validation only requires an entry for scripted components; scriptless ones are always Rust-derived and never require a manifest entry.
uses_shadow_dom: boolWhether this component effectively uses Shadow DOM.
Implementations§
Source§impl ComponentTemplateArtifact
impl ComponentTemplateArtifact
Sourcepub fn template(
tag_name: String,
template: String,
uses_shadow_dom: bool,
) -> ComponentTemplateArtifact
pub fn template( tag_name: String, template: String, uses_shadow_dom: bool, ) -> ComponentTemplateArtifact
Create a non-WebUI template payload.
Sourcepub fn webui(
tag_name: String,
template_json: String,
template_functions: String,
uses_shadow_dom: bool,
) -> ComponentTemplateArtifact
pub fn webui( tag_name: String, template_json: String, template_functions: String, uses_shadow_dom: bool, ) -> ComponentTemplateArtifact
Create a WebUI split metadata/function payload.
The hydration surface starts empty; the producing plugin attaches it with
Self::with_hydration once it has derived the surface.
Sourcepub fn with_hydration(
self,
hydration: StateSurface,
) -> ComponentTemplateArtifact
pub fn with_hydration( self, hydration: StateSurface, ) -> ComponentTemplateArtifact
Attach the initial hydration surface derived by the plugin.
Attach the partial-navigation surface derived by the plugin.
Sourcepub fn with_template_roots(
self,
roots: Vec<String>,
) -> ComponentTemplateArtifact
pub fn with_template_roots( self, roots: Vec<String>, ) -> ComponentTemplateArtifact
Attach the compiled template roots (see Self::template_roots).
Sourcepub fn scripted(self, is_scripted: bool) -> ComponentTemplateArtifact
pub fn scripted(self, is_scripted: bool) -> ComponentTemplateArtifact
Mark whether this component has an authored client module.
Trait Implementations§
Source§impl Clone for ComponentTemplateArtifact
impl Clone for ComponentTemplateArtifact
Source§fn clone(&self) -> ComponentTemplateArtifact
fn clone(&self) -> ComponentTemplateArtifact
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComponentTemplateArtifact
impl Debug for ComponentTemplateArtifact
impl Eq for ComponentTemplateArtifact
impl StructuralPartialEq for ComponentTemplateArtifact
Auto Trait Implementations§
impl Freeze for ComponentTemplateArtifact
impl RefUnwindSafe for ComponentTemplateArtifact
impl Send for ComponentTemplateArtifact
impl Sync for ComponentTemplateArtifact
impl Unpin for ComponentTemplateArtifact
impl UnsafeUnpin for ComponentTemplateArtifact
impl UnwindSafe for ComponentTemplateArtifact
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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