pub struct BinaryManager { /* private fields */ }Implementations§
Source§impl BinaryManager
impl BinaryManager
Sourcepub fn new() -> Result<BinaryManager, Error>
pub fn new() -> Result<BinaryManager, Error>
Create a new binary manager
Sourcepub fn with_version(version: String) -> Result<BinaryManager, Error>
pub fn with_version(version: String) -> Result<BinaryManager, Error>
Create a binary manager with a specific version
Sourcepub fn is_prebuilt_available(&self) -> bool
pub fn is_prebuilt_available(&self) -> bool
Check if pre-built binaries are available for current platform
Sourcepub async fn resolve(&self, node_name: &str) -> Result<PathBuf, Error>
pub async fn resolve(&self, node_name: &str) -> Result<PathBuf, Error>
Resolve binary path for a node, downloading if needed
Resolution strategy:
- Check if a cached binary exists for the current version/target
- If not, download it from
mecha10-api
There is no further fallback: if the platform has no pre-built binary, or the download fails, this returns an error immediately instead of silently degrading to a slower/older resolution path.
§Arguments
node_name- Name of the node (e.g., “speaker”, “motor”)
§Returns
Path to the executable binary
Sourcepub async fn resolve_with_version(
&self,
node_name: &str,
version: Option<&str>,
) -> Result<PathBuf, Error>
pub async fn resolve_with_version( &self, node_name: &str, version: Option<&str>, ) -> Result<PathBuf, Error>
Resolve binary path for a node with a specific version
Resolution strategy (LAB-4558: the ordered-tiers-with-aggregate-error control flow
below is shared via mecha10_binary_naming::try_resolution_tiers! with
NodeResolver::resolve_with_version and the CLI’s resolve_cli_binary - only the
concrete tiers here are specific to this type):
- Check if a cached binary exists for the current version/target
- If not, download it from
mecha10-api
There is no further fallback: if the platform has no pre-built binary, or the download fails, this returns an error immediately instead of silently degrading to a slower/older resolution path.
§Arguments
node_name- Name of the node (e.g., “speaker”, “motor”)version- Optional specific version to download (e.g., “0.1.48”). If None, downloads the latest available version.
§Returns
Path to the executable binary
Sourcepub async fn clear_cache(&self) -> Result<(), Error>
pub async fn clear_cache(&self) -> Result<(), Error>
Clear all cached binaries
Trait Implementations§
Source§impl Default for BinaryManager
impl Default for BinaryManager
Source§fn default() -> BinaryManager
fn default() -> BinaryManager
Auto Trait Implementations§
impl Freeze for BinaryManager
impl RefUnwindSafe for BinaryManager
impl Send for BinaryManager
impl Sync for BinaryManager
impl Unpin for BinaryManager
impl UnsafeUnpin for BinaryManager
impl UnwindSafe for BinaryManager
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
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> ⓘ
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> ⓘ
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 more