pub struct HotReloader { /* private fields */ }Expand description
Manages hot reloading of cells.
Coordinates the process of:
- Saving cell state
- Unloading the old library
- Compiling the new version
- Loading the new library
- Restoring state (if compatible)
Implementations§
Source§impl HotReloader
impl HotReloader
Sourcepub fn new(config: CompilerConfig) -> Result<Self>
pub fn new(config: CompilerConfig) -> Result<Self>
Create a new hot reloader.
Sourcepub fn with_compiler(compiler: CellCompiler) -> Self
pub fn with_compiler(compiler: CellCompiler) -> Self
Create with an existing compiler.
Sourcepub fn register_context(&mut self, cell_id: CellId, context: CellContext)
pub fn register_context(&mut self, cell_id: CellId, context: CellContext)
Register a cell context for cleanup tracking.
Sourcepub fn get_context(&self, cell_id: CellId) -> Option<&CellContext>
pub fn get_context(&self, cell_id: CellId) -> Option<&CellContext>
Get a cell’s context.
Sourcepub fn get_context_mut(&mut self, cell_id: CellId) -> Option<&mut CellContext>
pub fn get_context_mut(&mut self, cell_id: CellId) -> Option<&mut CellContext>
Get a mutable reference to a cell’s context.
Sourcepub fn reload_cell(
&mut self,
executor: &mut LinearExecutor,
cell_info: &CellInfo,
deps_hash: u64,
) -> Result<CompiledCell>
pub fn reload_cell( &mut self, executor: &mut LinearExecutor, cell_info: &CellInfo, deps_hash: u64, ) -> Result<CompiledCell>
Reload a single cell.
Returns the new compiled cell on success.
Sourcepub fn reload_cells(
&mut self,
executor: &mut LinearExecutor,
cells: &[&CellInfo],
graph: &GraphEngine,
) -> Result<Vec<CompiledCell>>
pub fn reload_cells( &mut self, executor: &mut LinearExecutor, cells: &[&CellInfo], graph: &GraphEngine, ) -> Result<Vec<CompiledCell>>
Reload multiple cells, respecting dependency order.
Cells are reloaded in topological order to ensure dependencies are available before dependents are executed.
Sourcepub fn reload_cascade(
&mut self,
executor: &mut LinearExecutor,
cell_info: &CellInfo,
graph: &GraphEngine,
) -> Result<Vec<CompiledCell>>
pub fn reload_cascade( &mut self, executor: &mut LinearExecutor, cell_info: &CellInfo, graph: &GraphEngine, ) -> Result<Vec<CompiledCell>>
Reload a cell and its downstream dependents.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HotReloader
impl !RefUnwindSafe for HotReloader
impl Send for HotReloader
impl !Sync for HotReloader
impl Unpin for HotReloader
impl !UnwindSafe for HotReloader
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.