Struct HubBuilder

Source
pub struct HubBuilder {
    pub route_send: HubRouteSend,
    pub http_server: Arc<Mutex<Option<HttpServer>>>,
    pub workspaces: Arc<Mutex<HashMap<String, String>>>,
    pub builder: String,
    pub abs_cwd_path: String,
    pub processes: Arc<Mutex<Vec<HubProcess>>>,
}

Fields§

§route_send: HubRouteSend§http_server: Arc<Mutex<Option<HttpServer>>>§workspaces: Arc<Mutex<HashMap<String, String>>>§builder: String§abs_cwd_path: String§processes: Arc<Mutex<Vec<HubProcess>>>

Implementations§

Source§

impl HubBuilder

Source

pub fn run_builder_direct<F>( builder: &str, hub_router: &mut HubRouter, event_handler: F, ) -> HubRouteSend
where F: Fn(&mut HubBuilder, FromHubMsg) -> Result<(), HubWsError> + Clone + Send + 'static,

Source

pub fn run_builder_networked<F>( digest: Digest, in_address: Option<SocketAddr>, builder: &str, hub_log: HubLog, event_handler: F, )
where F: Fn(&mut HubBuilder, FromHubMsg) -> Result<(), HubWsError> + Clone + Send + 'static,

Source

pub fn run_builder_commandline<F>(args: Vec<String>, event_handler: F)
where F: Fn(&mut HubBuilder, FromHubMsg) -> Result<(), HubWsError> + Clone + Send + 'static,

Source

pub fn set_config( &mut self, _uid: HubUid, config: HubBuilderConfig, ) -> Result<(), HubWsError>

Source

pub fn default(&mut self, htc: FromHubMsg) -> Result<(), HubWsError>

Source

pub fn process_kill(&mut self, uid: HubUid)

Source

pub fn workspace_split_from_path( &mut self, uid: HubUid, path: &str, ) -> Result<(String, String, String), HubWsError>

Source

pub fn get_workspace_abs( &mut self, uid: HubUid, workspace: &str, ) -> Result<String, HubWsError>

Source

pub fn program_run( &mut self, uid: HubUid, path: &str, args: &[&str], ) -> Result<(), HubWsError>

Source

pub fn cannot_find_build( &mut self, uid: HubUid, package: &str, target: &str, ) -> Result<(), HubWsError>

Source

pub fn cargo( &mut self, uid: HubUid, workspace: &str, args: &[&str], env: &[(&str, &str)], ) -> Result<BuildResult, HubWsError>

Source

pub fn packages_response( &mut self, from: HubAddr, uid: HubUid, packages: Vec<HubPackage>, )

Source

pub fn error(&mut self, uid: HubUid, msg: String) -> HubWsError

Source

pub fn message(&mut self, uid: HubUid, msg: String)

Source

pub fn wasm_strip_debug( &mut self, uid: HubUid, path: &str, ) -> Result<BuildResult, HubWsError>

Source

pub fn read_packages(&mut self, uid: HubUid) -> Vec<(String, String)>

Source

pub fn file_read(&mut self, from: HubAddr, uid: HubUid, path: &str)

Source

pub fn file_write( &mut self, from: HubAddr, uid: HubUid, path: &str, data: Vec<u8>, )

Source

pub fn workspace_file_tree( &mut self, create_digest: bool, ext_inc: &[&str], file_ex: &[&str], dir_ex: &[&str], ) -> BuilderFileTreeNode

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.