changed some calculator stuff idk

idk
This commit is contained in:
FantasyPvP
2023-10-04 00:40:18 +01:00
parent f5cc41c132
commit 4a7cf2a634
8 changed files with 117 additions and 83 deletions
@@ -0,0 +1,18 @@
- provides a simple trait to standardise the way applications are called and run from the shell or other applications.
```rust
use async_trait::async_trait;
// all applications should implment this trait and be started by using simlar to:
let res = ImplementsApplication.run(args).await?;
#[async_trait]
pub trait Application {
fn new -> Self;
async fn run(&mut self, _: Vec<String>) -> Result<(), Error>;
}
```
## important:
- the async_trait crate must be in scope in the file or else an error about trait bounds will be displayed at compile time.