diff --git a/Crystal-API.md b/Crystal-API.md new file mode 100644 index 0000000..d4e3a77 --- /dev/null +++ b/Crystal-API.md @@ -0,0 +1,23 @@ + +```rust +use async_trait::async_trait; +use alloc::{string::String, vec::Vec, boxed::Box}; + +#[async_trait] +pub trait Application { + fn new() -> Self; + + async fn run(&mut self, _: Vec) -> Result<(), Error> { + Ok(()) + } +} + +#[derive(Debug)] +pub enum Error { + UnknownCommand(String), + CommandFailed(String), + ApplicationError(String), + EmptyCommand, +} + +``` \ No newline at end of file