pub struct RustRuntime { /* private fields */ }Implementations§
Source§impl RustRuntime
impl RustRuntime
pub fn new() -> Result<Self>
pub fn set_project_root(&mut self, root: PathBuf)
pub async fn register_handler<F, Fut>(&self, name: String, handler: F)where
F: Fn(HandlerContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<HandlerResult>> + Send + 'static,
pub async fn execute_handler( &self, handler_path: &Path, context: HandlerContext, ) -> Result<HandlerResult>
pub async fn handler_count(&self) -> usize
pub async fn list_handlers(&self) -> Vec<String>
pub async fn clear_handlers(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustRuntime
impl !RefUnwindSafe for RustRuntime
impl Send for RustRuntime
impl Sync for RustRuntime
impl Unpin for RustRuntime
impl !UnwindSafe for RustRuntime
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