pub struct WebUiProtocol {
pub fragments: HashMap<String, FragmentList>,
pub tokens: Vec<String>,
pub components: HashMap<String, ComponentData>,
pub css_strategy: i32,
pub dom_strategy: i32,
}Fields§
§fragments: HashMap<String, FragmentList>§tokens: Vec<String>Sorted, deduplicated CSS custom property names used across all components and entry page styles (e.g., “colorBrandBackground”, “spacingMedium”). Only usage via var(–name) is included; local definitions are excluded.
components: HashMap<String, ComponentData>Per-component data keyed by tag name (f-template + CSS).
css_strategy: i32Build-wide CSS delivery strategy. Determines how the handler emits CSS-related tags in
for components with css_href.dom_strategy: i32Build-wide DOM encapsulation strategy. Combined with css_strategy to decide preload vs stylesheet emission.
Implementations§
Source§impl WebUiProtocol
impl WebUiProtocol
Sourcepub fn css_strategy(&self) -> CssStrategy
pub fn css_strategy(&self) -> CssStrategy
Returns the enum value of css_strategy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_css_strategy(&mut self, value: CssStrategy)
pub fn set_css_strategy(&mut self, value: CssStrategy)
Sets css_strategy to the provided enum value.
Sourcepub fn dom_strategy(&self) -> DomStrategy
pub fn dom_strategy(&self) -> DomStrategy
Returns the enum value of dom_strategy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_dom_strategy(&mut self, value: DomStrategy)
pub fn set_dom_strategy(&mut self, value: DomStrategy)
Sets dom_strategy to the provided enum value.
Source§impl WebUiProtocol
impl WebUiProtocol
Sourcepub fn new(fragments: WebUIFragmentRecords) -> Self
pub fn new(fragments: WebUIFragmentRecords) -> Self
Create a protocol from fragment records with no CSS tokens.
Sourcepub fn with_tokens(fragments: WebUIFragmentRecords, tokens: Vec<String>) -> Self
pub fn with_tokens(fragments: WebUIFragmentRecords, tokens: Vec<String>) -> Self
Create a protocol from fragment records with CSS tokens.
Source§impl WebUiProtocol
impl WebUiProtocol
Sourcepub fn to_json_pretty(&self) -> Result<String, Error>
pub fn to_json_pretty(&self) -> Result<String, Error>
Serialize protocol to pretty JSON (for debug/inspect output only).
Sourcepub fn to_protobuf(&self) -> Result<Vec<u8>>
pub fn to_protobuf(&self) -> Result<Vec<u8>>
Serialize protocol to protobuf binary format.
Sourcepub fn from_protobuf(bytes: &[u8]) -> Result<Self>
pub fn from_protobuf(bytes: &[u8]) -> Result<Self>
Deserialize protocol from protobuf binary bytes with validation.
Sourcepub fn from_protobuf_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_protobuf_file<P: AsRef<Path>>(path: P) -> Result<Self>
Read and deserialize a protobuf file with validation.
Trait Implementations§
Source§impl Clone for WebUiProtocol
impl Clone for WebUiProtocol
Source§fn clone(&self) -> WebUiProtocol
fn clone(&self) -> WebUiProtocol
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 WebUiProtocol
impl Debug for WebUiProtocol
Source§impl Default for WebUiProtocol
impl Default for WebUiProtocol
Source§impl<'de> Deserialize<'de> for WebUiProtocol
impl<'de> Deserialize<'de> for WebUiProtocol
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>,
Source§impl Message for WebUiProtocol
impl Message for WebUiProtocol
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.Source§impl PartialEq for WebUiProtocol
impl PartialEq for WebUiProtocol
Source§fn eq(&self, other: &WebUiProtocol) -> bool
fn eq(&self, other: &WebUiProtocol) -> bool
self and other values to be equal, and is used by ==.