pub enum PropertiesInit {
DescriptorDefault(&'static ErasedComponentDescriptor),
DescriptorInline {
descriptor: &'static ErasedComponentDescriptor,
defined_properties: BTreeMap<String, ValueDefinition>,
},
Template {
descriptor: &'static ErasedComponentDescriptor,
plan: Rc<TemplatePropertyPlan>,
},
Factory(Box<dyn Fn(Rc<RuntimePropertiesStackFrame>, Option<Rc<ExpandedNode>>) -> Option<Rc<RefCell<PaxAny>>>>),
}Expand description
Structured initialization for node-local typed properties.
Variants§
DescriptorDefault(&'static ErasedComponentDescriptor)
DescriptorInline
Fields
§
descriptor: &'static ErasedComponentDescriptor§
defined_properties: BTreeMap<String, ValueDefinition>Template
Factory(Box<dyn Fn(Rc<RuntimePropertiesStackFrame>, Option<Rc<ExpandedNode>>) -> Option<Rc<RefCell<PaxAny>>>>)
Implementations§
Source§impl PropertiesInit
impl PropertiesInit
Sourcepub fn adopt(self, properties: Rc<RefCell<PaxAny>>) -> PropertiesInit
pub fn adopt(self, properties: Rc<RefCell<PaxAny>>) -> PropertiesInit
Use an already constructed root while preserving its settings bindings. The allocation is shared directly; no descriptor default or value conversion may replace its property identities or Rust dependencies.
pub fn materialize( &self, stack_frame: Rc<RuntimePropertiesStackFrame>, expanded_node: Option<Rc<ExpandedNode>>, ) -> Option<Rc<RefCell<PaxAny>>>
Auto Trait Implementations§
impl !RefUnwindSafe for PropertiesInit
impl !Send for PropertiesInit
impl !Sync for PropertiesInit
impl !UnwindSafe for PropertiesInit
impl Freeze for PropertiesInit
impl Unpin for PropertiesInit
impl UnsafeUnpin for PropertiesInit
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.