pub struct BinaryManager { /* private fields */ }Expand description
Service for managing node binary downloads and caching
Implementations§
Source§impl BinaryManager
impl BinaryManager
Sourcepub fn with_version(version: String) -> Result<Self>
pub fn with_version(version: String) -> Result<Self>
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>
pub async fn resolve(&self, node_name: &str) -> Result<PathBuf>
Resolve binary path for a node, downloading if needed
Resolution strategy:
- Check if cached binary exists for current version/target
- If not, try to download from GitHub releases
- If download fails and platform unsupported, fall back to cargo install
§Arguments
node_name- Name of the node (e.g., “speaker”, “motor”)
§Returns
Path to the executable binary
Sourcepub async fn clear_cache(&self) -> Result<()>
pub async fn clear_cache(&self) -> Result<()>
Clear all cached binaries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinaryManager
impl RefUnwindSafe for BinaryManager
impl Send for BinaryManager
impl Sync for BinaryManager
impl Unpin 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
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 more