pub struct RustCrateService { /* private fields */ }
Implementations§
Source§impl RustCrateService
impl RustCrateService
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<RustCrateService>>, ) -> RustCratePortConfig
pub fn add_connection( &mut self, self_arc: &Arc<RwLock<RustCrateService>>, my_port: String, sink: &dyn RustCrateSink, ) -> Result<()>
pub fn stdout(&self) -> UnboundedReceiver<String>
pub fn stderr(&self) -> UnboundedReceiver<String>
pub fn stdout_filter(&self, prefix: String) -> UnboundedReceiver<String>
pub fn stderr_filter(&self, prefix: String) -> UnboundedReceiver<String>
pub fn tracing_results(&self) -> Option<&TracingResults>
pub fn exit_code(&self) -> Option<i32>
Trait Implementations§
Source§impl Service for RustCrateService
impl Service for RustCrateService
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 RustCrateService
impl !RefUnwindSafe for RustCrateService
impl Send for RustCrateService
impl Sync for RustCrateService
impl Unpin for RustCrateService
impl !UnwindSafe for RustCrateService
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