pub struct ComponentData {
pub template: String,
pub css: String,
pub css_href: String,
pub template_json: String,
pub template_functions: String,
pub hydration_keys: Vec<String>,
pub navigation_keys: Vec<String>,
pub hydration_mode: i32,
pub navigation_mode: Option<i32>,
pub uses_shadow_dom: bool,
pub work_policy: i32,
}Expand description
Per-component metadata keyed by tag name.
Fields§
§template: StringNon-WebUI client-side template payload.
FAST plugins store complete
css: StringCompiled component CSS content for the Style and Module strategies. Empty for Link and for components without CSS.
css_href: StringExternal stylesheet href for the Link CSS strategy. Set to e.g. “/my-card.css” when the component has a CSS file and the build used CssStrategy::Link. Empty for Style/Module strategies and for components without CSS. Ordered style closures decide which Document or ShadowRoot owns the link.
template_json: StringWebUI plugin JSON-safe component metadata. Stored separately from executable condition closures so handlers can emit the static metadata in application/json data blocks.
template_functions: StringWebUI plugin component-local JavaScript condition closure array. Empty when the component has no conditions or boolean attributes.
hydration_keys: Vec<String>Exact @observable + @attr property keys when hydration_mode is KEYS. Existing SSR host attributes take precedence; bootstrap state fills attribute-backed properties that were not materialized on the host. Template roots already exist in the trusted SSR DOM and do not enter initial state solely because a component has authored browser code. Sorted and deduplicated; empty for NONE and ALL.
Exact partial-navigation keys when navigation_mode is KEYS. Authored components use @observable + @attr property keys plus template roots. Scriptless compiled templates include only their template roots. Sorted and deduplicated; empty for NONE and ALL.
hydration_mode: i32How initial hydration state is selected for this component.
How partial-navigation state is selected for this component. Presence is significant: protocols produced before projection metadata leave this absent, so handlers preserve full state instead of treating it as NONE.
uses_shadow_dom: boolWhether this component effectively uses Shadow DOM after build-time fallback and authored declarative Shadow DOM resolution.
work_policy: i32Compiler-owned client work policy. Zero/eager is absent on the wire.
Implementations§
Source§impl ComponentData
impl ComponentData
Sourcepub fn hydration_mode(&self) -> StateProjectionMode
pub fn hydration_mode(&self) -> StateProjectionMode
Returns the enum value of hydration_mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_hydration_mode(&mut self, value: StateProjectionMode)
pub fn set_hydration_mode(&mut self, value: StateProjectionMode)
Sets hydration_mode to the provided enum value.
Returns the enum value of navigation_mode, or the default if the field is unset or set to an invalid enum value.
Sets navigation_mode to the provided enum value.
Sourcepub fn work_policy(&self) -> ComponentWorkPolicy
pub fn work_policy(&self) -> ComponentWorkPolicy
Returns the enum value of work_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_work_policy(&mut self, value: ComponentWorkPolicy)
pub fn set_work_policy(&mut self, value: ComponentWorkPolicy)
Sets work_policy to the provided enum value.
Trait Implementations§
Source§impl Clone for ComponentData
impl Clone for ComponentData
Source§fn clone(&self) -> ComponentData
fn clone(&self) -> ComponentData
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 ComponentData
impl Debug for ComponentData
Source§impl Default for ComponentData
impl Default for ComponentData
Source§impl<'de> Deserialize<'de> for ComponentData
impl<'de> Deserialize<'de> for ComponentData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ComponentData
Source§impl Hash for ComponentData
impl Hash for ComponentData
Source§impl Message for ComponentData
impl Message for ComponentData
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.