pub struct Backend {
pub name: String,
pub renamed_from: Option<String>,
pub runner: Runner,
pub options: Value,
}Expand description
Where the resolver executes: a backend, resolved from its name.
Fields§
§name: String§renamed_from: Option<String>The old name it was selected by (devbox, cluster).
runner: Runner§options: Value[backends.<name>] options, sent with every work item.
Implementations§
Source§impl Backend
impl Backend
Sourcepub fn resolve(manifest: &Manifest, name: Option<&str>) -> Result<Backend>
pub fn resolve(manifest: &Manifest, name: Option<&str>) -> Result<Backend>
The backend name names, else the manifest’s [backend] target: a built-in, a
[backends.<name>] table, an hlock-backend-<name> executable on PATH, or else
a Python backend the worker looks up by entry point (and reports missing when
it’s described).
pub fn as_str(&self) -> &str
Sourcepub fn needs_worker(&self) -> bool
pub fn needs_worker(&self) -> bool
Whether this backend’s work runs in a backend process (everything but offline).
Sourcepub fn renamed_note(&self) -> Option<String>
pub fn renamed_note(&self) -> Option<String>
The note for a backend selected by its old name.
Sourcepub fn cache_identity(&self) -> String
pub fn cache_identity(&self) -> String
What, besides its name, decides the results this backend gives: its options.
Sourcepub fn executor(&self) -> Option<ProcessExecutor>
pub fn executor(&self) -> Option<ProcessExecutor>
The process that runs this backend’s work items, or None for offline.
Trait Implementations§
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Forget for Backend
impl Freeze for Backend
impl Move for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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