pub struct HydroflowCrateService { /* private fields */ }
Implementations§
source§impl HydroflowCrateService
impl HydroflowCrateService
pub fn new( id: usize, src: PathBuf, on: Arc<dyn Host>, bin: Option<String>, example: Option<String>, profile: Option<String>, rustflags: Option<String>, target_dir: Option<PathBuf>, no_default_features: bool, tracing: Option<TracingOptions>, features: Option<Vec<String>>, args: Option<Vec<String>>, display_id: Option<String>, external_ports: Vec<u16>, ) -> Self
pub fn update_meta<T: Serialize>(&mut self, meta: T)
pub fn get_port( &self, name: String, self_arc: &Arc<RwLock<HydroflowCrateService>>, ) -> HydroflowPortConfig
pub fn add_connection( &mut self, self_arc: &Arc<RwLock<HydroflowCrateService>>, my_port: String, sink: &dyn HydroflowSink, ) -> Result<()>
pub fn stdout(&self) -> UnboundedReceiver<String>
pub fn stderr(&self) -> UnboundedReceiver<String>
pub fn exit_code(&self) -> Option<i32>
Trait Implementations§
source§impl Service for HydroflowCrateService
impl Service for HydroflowCrateService
source§fn collect_resources(&self, _resource_batch: &mut ResourceBatch)
fn collect_resources(&self, _resource_batch: &mut ResourceBatch)
Makes requests for physical resources server ports that this service needs to run.
This should not recursively call
collect_resources
on the host, since
we guarantee that collect_resources
is only called once per host. Read moresource§fn deploy<'life0, 'life1, 'async_trait>(
&'life0 mut self,
resource_result: &'life1 Arc<ResourceResult>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deploy<'life0, 'life1, 'async_trait>(
&'life0 mut self,
resource_result: &'life1 Arc<ResourceResult>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Connects to the acquired resources and prepares the service to be launched.
source§fn ready<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ready<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Launches the service, which should start listening for incoming network
connections. The service should not start computing at this point.
Auto Trait Implementations§
impl Freeze for HydroflowCrateService
impl !RefUnwindSafe for HydroflowCrateService
impl Send for HydroflowCrateService
impl Sync for HydroflowCrateService
impl Unpin for HydroflowCrateService
impl !UnwindSafe for HydroflowCrateService
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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