Skip to main content

ObsBootstrapper

Struct ObsBootstrapper 

Source
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

Source

pub fn is_valid_installation() -> Result<bool, ObsBootstrapError>

Checks the default executable-adjacent installation location without performing network I/O.

Source

pub fn is_valid_installation_with_options( options: &ObsBootstrapperOptions, ) -> Result<bool, ObsBootstrapError>

Checks the installation location selected by options without network I/O.

Source

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.

Source

pub fn is_update_available_with_options( options: &ObsBootstrapperOptions, ) -> Result<bool, ObsBootstrapError>

Compares a local runtime with options.target_version without network I/O.

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.