pub struct Environment { /* private fields */ }Implementations§
Source§impl Environment
impl Environment
pub fn new(config: Option<EnvironmentConfig>) -> Self
pub async fn register_runtime( &mut self, runtime: Arc<dyn Runtime>, ) -> Result<(), Error>
pub fn config(&self) -> &EnvironmentConfig
pub async fn get_runtime( &self, runtime_id: Option<RuntimeID>, ) -> Option<Arc<dyn Runtime>>
pub async fn get_runtime_or_default( &self, runtime_id: Option<RuntimeID>, ) -> Result<Arc<dyn Runtime>, Error>
pub fn run(&mut self) -> JoinHandle<Result<(), RuntimeError>>
pub async fn take_event_receiver( &mut self, runtime_id: Option<RuntimeID>, ) -> Option<ReceiverStream<Event>>
pub async fn shutdown(&mut self)
Auto Trait Implementations§
impl Freeze for Environment
impl !RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
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