pub struct PatchHook<'a, N: FlowNodeBase> { /* private fields */ }
Expand description
Patch operations in the context of a particular Node.
Implementations§
Source§impl<N> PatchHook<'_, N>where
N: FlowNodeBase + 'static,
impl<N> PatchHook<'_, N>where
N: FlowNodeBase + 'static,
Sourcepub fn swap_with<M>(&mut self) -> &mut Selfwhere
M: 'static + FlowNodeBase<Request = N::Request>,
pub fn swap_with<M>(&mut self) -> &mut Selfwhere
M: 'static + FlowNodeBase<Request = N::Request>,
Swap out the target Node’s implementation with a different implementation.
Sourcepub fn inject_side_effect<T, M>(
&mut self,
f: impl FnOnce(WriteVar<T>) -> M::Request,
) -> &mut Self
pub fn inject_side_effect<T, M>( &mut self, f: impl FnOnce(WriteVar<T>) -> M::Request, ) -> &mut Self
Inject a side-effect dependency, which runs before any other steps in the Node.
Auto Trait Implementations§
impl<'a, N> Freeze for PatchHook<'a, N>
impl<'a, N> !RefUnwindSafe for PatchHook<'a, N>
impl<'a, N> !Send for PatchHook<'a, N>
impl<'a, N> !Sync for PatchHook<'a, N>
impl<'a, N> Unpin for PatchHook<'a, N>where
N: Unpin,
impl<'a, N> !UnwindSafe for PatchHook<'a, N>
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