pub struct ObsBootstrapper {}Expand description
Explicit OBS runtime provisioning and local-installation inspection.
Calling ObsBootstrapper::bootstrap is the opt-in operation that may use
the network. Merely depending on this crate or inspecting an installation
never downloads or executes anything.
Implementations§
Source§impl ObsBootstrapper
impl ObsBootstrapper
Sourcepub fn is_valid_installation() -> Result<bool, ObsBootstrapError>
pub fn is_valid_installation() -> Result<bool, ObsBootstrapError>
Checks the default executable-adjacent installation location without performing network I/O.
Sourcepub fn is_valid_installation_with_options(
options: &ObsBootstrapperOptions,
) -> Result<bool, ObsBootstrapError>
pub fn is_valid_installation_with_options( options: &ObsBootstrapperOptions, ) -> Result<bool, ObsBootstrapError>
Checks the installation location selected by options without network I/O.
Sourcepub fn is_update_available() -> Result<bool, ObsBootstrapError>
pub fn is_update_available() -> Result<bool, ObsBootstrapError>
Compares the default local runtime with the configured default target. This is local-only and does not query GitHub.
Sourcepub fn is_update_available_with_options(
options: &ObsBootstrapperOptions,
) -> Result<bool, ObsBootstrapError>
pub fn is_update_available_with_options( options: &ObsBootstrapperOptions, ) -> Result<bool, ObsBootstrapError>
Compares a local runtime with options.target_version without network I/O.
Sourcepub async fn bootstrap(
options: &ObsBootstrapperOptions,
) -> Result<ObsBootstrapperResult, ObsBootstrapError>
pub async fn bootstrap( options: &ObsBootstrapperOptions, ) -> Result<ObsBootstrapperResult, ObsBootstrapError>
Explicitly provisions OBS using the configured release policy.
This is the operation that may access the network. Downloaded official release assets must advertise a SHA-256 checksum/digest and are verified before extraction. No helper process is spawned and the application is never restarted automatically.
Sourcepub async fn bootstrap_with_handler<E: Send + Sync + 'static + Error>(
options: &ObsBootstrapperOptions,
handler: Box<dyn ObsBootstrapStatusHandler<Error = E>>,
) -> Result<ObsBootstrapperResult, ObsBootstrapError>
pub async fn bootstrap_with_handler<E: Send + Sync + 'static + Error>( options: &ObsBootstrapperOptions, handler: Box<dyn ObsBootstrapStatusHandler<Error = E>>, ) -> Result<ObsBootstrapperResult, ObsBootstrapError>
Same as Self::bootstrap, with custom progress notifications.