pub struct HermesRuntime {
pub runtime: Arc<Runtime>,
}Fields§
§runtime: Arc<Runtime>Implementations§
Trait Implementations§
Source§impl Clone for HermesRuntime
impl Clone for HermesRuntime
Source§fn clone(&self) -> HermesRuntime
fn clone(&self) -> HermesRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ErrorRaiser<HermesRuntime, Error> for HermesRuntimeComponents
impl ErrorRaiser<HermesRuntime, Error> for HermesRuntimeComponents
fn raise_error(e: IoError) -> TokioRuntimeError
Source§impl ErrorRaiser<HermesRuntime, ExitStatus> for HermesRuntimeComponents
impl ErrorRaiser<HermesRuntime, ExitStatus> for HermesRuntimeComponents
fn raise_error(exit_status: ExitStatus) -> TokioRuntimeError
Source§impl ErrorRaiser<HermesRuntime, Utf8Error> for HermesRuntimeComponents
impl ErrorRaiser<HermesRuntime, Utf8Error> for HermesRuntimeComponents
fn raise_error(e: Utf8Error) -> TokioRuntimeError
Source§impl HasTokioRuntime for HermesRuntime
impl HasTokioRuntime for HermesRuntime
fn tokio_runtime(&self) -> &Runtime
Auto Trait Implementations§
impl Freeze for HermesRuntime
impl RefUnwindSafe for HermesRuntime
impl Send for HermesRuntime
impl Sync for HermesRuntime
impl Unpin for HermesRuntime
impl UnwindSafe for HermesRuntime
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
Source§impl<Runtime> CanCloneSender for Runtimewhere
Runtime: HasChannelTypes + HasComponents,
<Runtime as HasComponents>::Components: SenderCloner<Runtime>,
impl<Runtime> CanCloneSender for Runtimewhere
Runtime: HasChannelTypes + HasComponents,
<Runtime as HasComponents>::Components: SenderCloner<Runtime>,
fn clone_sender<T>(
sender: &<Runtime as HasChannelTypes>::Sender<T>,
) -> <Runtime as HasChannelTypes>::Sender<T>where
T: Async,
Source§impl<Runtime> CanCopyFile for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: FileCopier<Runtime>,
impl<Runtime> CanCopyFile for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: FileCopier<Runtime>,
async fn copy_file( &self, source_path: &<Runtime as HasFilePathType>::FilePath, destination_path: &<Runtime as HasFilePathType>::FilePath, ) -> Result<(), <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanCreateChannels for Runtimewhere
Runtime: HasChannelTypes + HasComponents,
<Runtime as HasComponents>::Components: ChannelCreator<Runtime>,
impl<Runtime> CanCreateChannels for Runtimewhere
Runtime: HasChannelTypes + HasComponents,
<Runtime as HasComponents>::Components: ChannelCreator<Runtime>,
Source§fn new_channel<T>() -> (<Runtime as HasChannelTypes>::Sender<T>, <Runtime as HasChannelTypes>::Receiver<T>)where
T: Async,
fn new_channel<T>() -> (<Runtime as HasChannelTypes>::Sender<T>, <Runtime as HasChannelTypes>::Receiver<T>)where
T: Async,
Given a generic payload type
T, create a
Sender<T> and
Receiver<T> pair that are connected. Read moreSource§impl<Runtime> CanCreateChannelsOnce for Runtimewhere
Runtime: HasChannelOnceTypes + HasComponents,
<Runtime as HasComponents>::Components: ChannelOnceCreator<Runtime>,
impl<Runtime> CanCreateChannelsOnce for Runtimewhere
Runtime: HasChannelOnceTypes + HasComponents,
<Runtime as HasComponents>::Components: ChannelOnceCreator<Runtime>,
fn new_channel_once<T>() -> (<Runtime as HasChannelOnceTypes>::SenderOnce<T>, <Runtime as HasChannelOnceTypes>::ReceiverOnce<T>)where
T: Async,
Source§impl<Runtime> CanCreateClosureSubscription for Runtimewhere
Runtime: HasMutex,
impl<Runtime> CanCreateClosureSubscription for Runtimewhere
Runtime: HasMutex,
Source§impl<Runtime> CanCreateDir for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: DirCreator<Runtime>,
impl<Runtime> CanCreateDir for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: DirCreator<Runtime>,
async fn create_dir( &self, dir_path: &<Runtime as HasFilePathType>::FilePath, ) -> Result<(), <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanExecCommand for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: CommandExecutor<Runtime>,
impl<Runtime> CanExecCommand for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: CommandExecutor<Runtime>,
async fn exec_command( &self, command_path: &<Runtime as HasFilePathType>::FilePath, args: &[&str], ) -> Result<ExecOutput, <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanExecCommandWithEnvs for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: CommandWithEnvsExecutor<Runtime>,
impl<Runtime> CanExecCommandWithEnvs for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: CommandWithEnvsExecutor<Runtime>,
async fn exec_command_with_envs( &self, command_path: &<Runtime as HasFilePathType>::FilePath, args: &[&str], envs: &[(&str, &str)], ) -> Result<ExecOutput, <Runtime as HasErrorType>::Error>
Source§impl<Runtime, T> CanGenerateRandom<T> for Runtimewhere
T: Async,
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: RandomGenerator<Runtime, T>,
impl<Runtime, T> CanGenerateRandom<T> for Runtimewhere
T: Async,
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: RandomGenerator<Runtime, T>,
async fn generate_random(&self) -> T
async fn random_range(&self, min: T, max: T) -> T
Source§impl<Runtime> CanMapStream for Runtimewhere
Runtime: HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: StreamMapper<Runtime>,
impl<Runtime> CanMapStream for Runtimewhere
Runtime: HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: StreamMapper<Runtime>,
fn map_stream<T, U, M>( stream: <Runtime as HasStreamType>::Stream<T>, mapper: M, ) -> <Runtime as HasStreamType>::Stream<U>
Source§impl<Runtime> CanMultiplexSubscription for Runtimewhere
Runtime: CanSpawnTask + HasMutex + CanCreateChannels + CanUseChannels + CanStreamReceiver + HasBoxedStreamType,
impl<Runtime> CanMultiplexSubscription for Runtimewhere
Runtime: CanSpawnTask + HasMutex + CanCreateChannels + CanUseChannels + CanStreamReceiver + HasBoxedStreamType,
Source§fn multiplex_subscription<T, U>(
&self,
subscription: impl Subscription<Item = T>,
mapper: impl Fn(T) -> U + Async,
) -> Arc<dyn Subscription<Item = U>>
fn multiplex_subscription<T, U>( &self, subscription: impl Subscription<Item = T>, mapper: impl Fn(T) -> U + Async, ) -> Arc<dyn Subscription<Item = U>>
Multiplex a given subscription, with a mapper function that maps the
item coming from the underlying subscription from
T to U. Returns
a new multiplexed subscription that shares the same underlying Stream.Source§impl<Runtime> CanPipeReaderToFile for Runtimewhere
Runtime: HasFilePathType + CanSpawnTask + CanRaiseError<Error>,
<Runtime as HasFilePathType>::FilePath: AsRef<Path>,
impl<Runtime> CanPipeReaderToFile for Runtimewhere
Runtime: HasFilePathType + CanSpawnTask + CanRaiseError<Error>,
<Runtime as HasFilePathType>::FilePath: AsRef<Path>,
async fn pipe_reader_to_file( &self, reader: impl AsyncRead + Unpin + Send + Sync + 'static, file_path: &<Runtime as HasFilePathType>::FilePath, ) -> Result<(), <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanReadFileAsString for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: FileAsStringReader<Runtime>,
impl<Runtime> CanReadFileAsString for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: FileAsStringReader<Runtime>,
async fn read_file_as_string( &self, file_path: &<Runtime as HasFilePathType>::FilePath, ) -> Result<String, <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanReserveTcpPort for Runtimewhere
Runtime: Async + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: TcpPortReserver<Runtime>,
impl<Runtime> CanReserveTcpPort for Runtimewhere
Runtime: Async + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: TcpPortReserver<Runtime>,
async fn reserve_tcp_port( &self, ) -> Result<u16, <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanRunConcurrentTasks for Runtimewhere
Runtime: HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: ConcurrentTaskRunner<Runtime>,
impl<Runtime> CanRunConcurrentTasks for Runtimewhere
Runtime: HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: ConcurrentTaskRunner<Runtime>,
async fn run_concurrent_tasks<T>(&self, tasks: Vec<T>)where
T: Task,
async fn run_concurrent_task_stream<T>(
&self,
tasks: <Runtime as HasStreamType>::Stream<T>,
)where
T: Task,
Source§impl<Runtime> CanSpawnTask for Runtime
impl<Runtime> CanSpawnTask for Runtime
fn spawn_task<T>(&self, task: T)where
T: Task,
Source§impl<Runtime> CanStartChildProcess for Runtimewhere
Runtime: HasChildProcessType + HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChildProcessStarter<Runtime>,
impl<Runtime> CanStartChildProcess for Runtimewhere
Runtime: HasChildProcessType + HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChildProcessStarter<Runtime>,
async fn start_child_process( &self, command_path: &<Runtime as HasFilePathType>::FilePath, command_args: &[&str], envs: &[(&str, &str)], stdout_path: Option<&<Runtime as HasFilePathType>::FilePath>, stderr_path: Option<&<Runtime as HasFilePathType>::FilePath>, ) -> Result<<Runtime as HasChildProcessType>::ChildProcess, <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanStreamReceiver for Runtimewhere
Runtime: HasChannelTypes + HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: ReceiverStreamer<Runtime>,
impl<Runtime> CanStreamReceiver for Runtimewhere
Runtime: HasChannelTypes + HasStreamType + HasComponents,
<Runtime as HasComponents>::Components: ReceiverStreamer<Runtime>,
fn receiver_to_stream<T>(
receiver: <Runtime as HasChannelTypes>::Receiver<T>,
) -> <Runtime as HasStreamType>::Stream<T>where
T: Async,
Source§impl<Runtime> CanStreamSubscription for Runtimewhere
Runtime: CanSpawnTask + HasMutex + CanCreateChannels + CanUseChannels + CanStreamReceiver + HasBoxedStreamType,
impl<Runtime> CanStreamSubscription for Runtimewhere
Runtime: CanSpawnTask + HasMutex + CanCreateChannels + CanUseChannels + CanStreamReceiver + HasBoxedStreamType,
fn stream_subscription<S, T>( &self, stream: S, ) -> Arc<dyn Subscription<Item = T>>
Source§impl<Runtime> CanUseChannels for Runtimewhere
Runtime: HasChannelTypes + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChannelUser<Runtime>,
impl<Runtime> CanUseChannels for Runtimewhere
Runtime: HasChannelTypes + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChannelUser<Runtime>,
Source§async fn send<T>(
sender: &<Runtime as HasChannelTypes>::Sender<T>,
value: T,
) -> Result<(), <Runtime as HasErrorType>::Error>where
T: Async,
async fn send<T>(
sender: &<Runtime as HasChannelTypes>::Sender<T>,
value: T,
) -> Result<(), <Runtime as HasErrorType>::Error>where
T: Async,
Source§async fn receive<T>(
receiver: &mut <Runtime as HasChannelTypes>::Receiver<T>,
) -> Result<T, <Runtime as HasErrorType>::Error>where
T: Async,
async fn receive<T>(
receiver: &mut <Runtime as HasChannelTypes>::Receiver<T>,
) -> Result<T, <Runtime as HasErrorType>::Error>where
T: Async,
Given a reference to
Receiver<T>,
asynchronously receive a message payload of type T that is sent
over the sender end. Read morefn try_receive<T>(
receiver: &mut <Runtime as HasChannelTypes>::Receiver<T>,
) -> Result<Option<T>, <Runtime as HasErrorType>::Error>where
T: Async,
Source§impl<Runtime> CanUseChannelsOnce for Runtimewhere
Runtime: HasChannelOnceTypes + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChannelOnceUser<Runtime>,
impl<Runtime> CanUseChannelsOnce for Runtimewhere
Runtime: HasChannelOnceTypes + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChannelOnceUser<Runtime>,
fn send_once<T>(
sender: <Runtime as HasChannelOnceTypes>::SenderOnce<T>,
value: T,
) -> Result<(), <Runtime as HasErrorType>::Error>where
T: Async,
async fn receive_once<T>(
receiver: <Runtime as HasChannelOnceTypes>::ReceiverOnce<T>,
) -> Result<T, <Runtime as HasErrorType>::Error>where
T: Async,
Source§impl<Runtime> CanWaitChildProcess for Runtimewhere
Runtime: HasChildProcessType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChildProcessWaiter<Runtime>,
impl<Runtime> CanWaitChildProcess for Runtimewhere
Runtime: HasChildProcessType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: ChildProcessWaiter<Runtime>,
async fn wait_child_process( child_process: <Runtime as HasChildProcessType>::ChildProcess, ) -> Result<(), <Runtime as HasErrorType>::Error>
Source§impl<Runtime> CanWriteStringToFile for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: StringToFileWriter<Runtime>,
impl<Runtime> CanWriteStringToFile for Runtimewhere
Runtime: HasFilePathType + HasErrorType + HasComponents,
<Runtime as HasComponents>::Components: StringToFileWriter<Runtime>,
async fn write_string_to_file( &self, path: &<Runtime as HasFilePathType>::FilePath, content: &str, ) -> Result<(), <Runtime as HasErrorType>::Error>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Runtime, Components> HasBoxedStreamType for Runtimewhere
Runtime: Async + HasComponents<Components = Components>,
Components: BoxedStreamTypeProvider<Runtime>,
impl<Runtime, Components> HasBoxedStreamType for Runtimewhere
Runtime: Async + HasComponents<Components = Components>,
Components: BoxedStreamTypeProvider<Runtime>,
fn to_boxed_stream<Item>(
stream: <Runtime as HasStreamType>::Stream<Item>,
) -> Pin<Box<dyn Stream<Item = Item> + Sync + Send>>where
Item: Async,
fn from_boxed_stream<Item>(
stream: Pin<Box<dyn Stream<Item = Item> + Sync + Send>>,
) -> <Runtime as HasStreamType>::Stream<Item>where
Item: Async,
Source§impl<Runtime> HasChannelOnceTypes for Runtimewhere
Runtime: HasComponents,
<Runtime as HasComponents>::Components: ProvideChannelOnceType<Runtime>,
impl<Runtime> HasChannelOnceTypes for Runtimewhere
Runtime: HasComponents,
<Runtime as HasComponents>::Components: ProvideChannelOnceType<Runtime>,
type SenderOnce<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelOnceType<Runtime>>::SenderOnce<T>
type ReceiverOnce<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelOnceType<Runtime>>::ReceiverOnce<T>
Source§impl<Runtime> HasChannelTypes for Runtimewhere
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: ProvideChannelType<Runtime>,
impl<Runtime> HasChannelTypes for Runtimewhere
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: ProvideChannelType<Runtime>,
Source§type Sender<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelType<Runtime>>::Sender<T>
type Sender<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelType<Runtime>>::Sender<T>
The sender end of a channel with payload type T.
Source§type Receiver<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelType<Runtime>>::Receiver<T>
type Receiver<T: Async> = <<Runtime as HasComponents>::Components as ProvideChannelType<Runtime>>::Receiver<T>
The receiver end of a channel with payload type T.
Source§impl<Runtime> HasChildProcessType for Runtimewhere
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: ProvideChildProcessType<Runtime>,
impl<Runtime> HasChildProcessType for Runtimewhere
Runtime: Async + HasComponents,
<Runtime as HasComponents>::Components: ProvideChildProcessType<Runtime>,
type ChildProcess = <<Runtime as HasComponents>::Components as ProvideChildProcessType<Runtime>>::ChildProcess
Source§impl<Context> HasErrorType for Context
impl<Context> HasErrorType for Context
Source§type Error = <<Context as HasComponents>::Components as ProvideErrorType<Context>>::Error
type Error = <<Context as HasComponents>::Components as ProvideErrorType<Context>>::Error
The Error associated type is also required to implement Debug.
This is to allow Self::Error to be used in calls like .unwrap(),
as well as for simpler error logging.