pub struct PlanInstance { /* private fields */ }Expand description
Non-owning access to the live nodes of one declared construction. Cloning a plan never clones an instance’s nodes, event captures or reactive state.
Implementations§
Source§impl PlanInstance
impl PlanInstance
pub fn node(&self, part: &PlanPart) -> Result<NodeId>
pub fn patch(&self, part: &PlanPart, patch: Patch) -> Result
pub fn bind<T: Clone + PartialEq + 'static>( &self, part: &PlanPart, value: impl Into<Vary<T>>, patch: impl FnMut(T) -> Patch + 'static, ) -> Result
Sourcepub fn bind_fn<T: Clone + PartialEq + 'static>(
&self,
part: &PlanPart,
read: impl FnMut() -> T + 'static,
patch: impl FnMut(T) -> Patch + 'static,
) -> Result
pub fn bind_fn<T: Clone + PartialEq + 'static>( &self, part: &PlanPart, read: impl FnMut() -> T + 'static, patch: impl FnMut(T) -> Patch + 'static, ) -> Result
One pure property observer, without an intermediate Bond. Use Bond for shared/cached computations; this closure runs under the instance Owner.
pub fn text_fn( &self, part: &PlanPart, read: impl FnMut() -> String + 'static, ) -> Result
pub fn label_fn( &self, part: &PlanPart, read: impl FnMut() -> String + 'static, ) -> Result
pub fn class_fn( &self, part: &PlanPart, read: impl FnMut() -> String + 'static, ) -> Result
pub fn text(&self, part: &PlanPart, value: impl Into<Vary<String>>) -> Result
pub fn label(&self, part: &PlanPart, value: impl Into<Vary<String>>) -> Result
pub fn class(&self, part: &PlanPart, value: impl Into<Vary<String>>) -> Result
pub fn on( &self, part: &PlanPart, kind: EventKind, handler: impl FnMut(Event) + 'static, ) -> Result
Auto Trait Implementations§
impl !RefUnwindSafe for PlanInstance
impl !Send for PlanInstance
impl !Sync for PlanInstance
impl !UnwindSafe for PlanInstance
impl Forget for PlanInstance
impl Freeze for PlanInstance
impl Unpin for PlanInstance
impl UnsafeUnpin for PlanInstance
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