Type Alias shuttle_poem::ShuttlePoem
source · pub type ShuttlePoem<T> = Result<PoemService<T>, Error>;
Expand description
§Shuttle service integration for the Poem web framework
§Example
use poem::{get, handler, Route};
use shuttle_poem::ShuttlePoem;
#[handler]
fn hello_world() -> &'static str {
"Hello, world!"
}
#[shuttle_runtime::main]
async fn poem() -> ShuttlePoem<impl poem::Endpoint> {
let app = Route::new().at("/", get(hello_world));
Ok(app.into())
}
Aliased Type§
enum ShuttlePoem<T> {
Ok(PoemService<T>),
Err(Error),
}