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),
}

Variants§

§1.0.0

Ok(PoemService<T>)

Contains the success value

§1.0.0

Err(Error)

Contains the error value