pub struct FragmentComponent {
pub name: String,
pub params: Vec<String>,
pub inlinable: bool,
}Expand description
A candela function name that reaches a fragment.
A candela function returns an lmn! block, and a use site names that
function as a tag. Nothing parses markup while an app runs, so the tree a
use site stands for is baked before the app starts; inlinable is whether
baking it is the whole story.
It is set when instantiating the fragment is the same as calling the function: the block is the function’s whole body, and every value the block reads is one the caller passed. The build then puts the body at the use site and the subtree is there from the first frame.
It is clear when the function has to run, because it works a value out or
picks between blocks. Every block it may return is compiled just the same;
what stands at the use site is a marker the runtime fills on the first tick,
by calling the function with params and putting the node
it returns in the marker’s place.
Fields§
§name: StringThe candela function’s name, as a use site writes it.
params: Vec<String>The function’s parameters, in declaration order. A use site binds props by name; a call passes them in this order.
inlinable: boolWhether the baked body is what the call would have returned.
Trait Implementations§
Source§impl Clone for FragmentComponent
impl Clone for FragmentComponent
Source§fn clone(&self) -> FragmentComponent
fn clone(&self) -> FragmentComponent
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 FragmentComponent
impl Debug for FragmentComponent
Source§impl<'de> Deserialize<'de> for FragmentComponent
impl<'de> Deserialize<'de> for FragmentComponent
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 PartialEq for FragmentComponent
impl PartialEq for FragmentComponent
Source§fn eq(&self, other: &FragmentComponent) -> bool
fn eq(&self, other: &FragmentComponent) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FragmentComponent
impl Serialize for FragmentComponent
impl Eq for FragmentComponent
impl StructuralPartialEq for FragmentComponent
Auto Trait Implementations§
impl Freeze for FragmentComponent
impl RefUnwindSafe for FragmentComponent
impl Send for FragmentComponent
impl Sync for FragmentComponent
impl Unpin for FragmentComponent
impl UnsafeUnpin for FragmentComponent
impl UnwindSafe for FragmentComponent
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,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.