pub struct LocalBackend { /* private fields */ }Expand description
Runs the build locally via the in-process DAG scheduler, executing each
step inside a VM provided by the injected hm_vm::VmBackend.
Constructed once and reused across multiple start calls.
parallelism controls the maximum number of concurrently running step
chains; the scheduler serialises within each chain regardless.
Implementations§
Source§impl LocalBackend
impl LocalBackend
Sourcepub fn new(parallelism: NonZeroUsize, vm_backend: Arc<dyn VmBackend>) -> Self
pub fn new(parallelism: NonZeroUsize, vm_backend: Arc<dyn VmBackend>) -> Self
Build a backend that executes steps on the given hm_vm::VmBackend.
parallelism = max concurrent step chains. The NonZeroUsize type
makes the scheduler’s semaphore construction deadlock-free by
construction (a zero-permit semaphore would stall every step).
Trait Implementations§
Source§impl Debug for LocalBackend
impl Debug for LocalBackend
Source§impl ExecutionBackend for LocalBackend
impl ExecutionBackend for LocalBackend
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
What this backend can honor — consulted by the CLI before
start.Source§fn start<'life0, 'async_trait>(
&'life0 self,
req: RunRequest,
) -> Pin<Box<dyn Future<Output = Result<BackendHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
req: RunRequest,
) -> Pin<Box<dyn Future<Output = Result<BackendHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin running the whole build. Setup failures (auth, bad plan, no
daemon) fail here; a failed build is
Ok(handle) resolving to
BuildOutcome { status: Failed }.Auto Trait Implementations§
impl !RefUnwindSafe for LocalBackend
impl !UnwindSafe for LocalBackend
impl Freeze for LocalBackend
impl Send for LocalBackend
impl Sync for LocalBackend
impl Unpin for LocalBackend
impl UnsafeUnpin for LocalBackend
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