[][src]Function roa_router::put

pub fn put<S>(endpoint: impl for<'a> Endpoint<'a, S>) -> Dispatcher<S>

Function to construct dispatcher with Method::PUT and an endpoint.

You can use it as follow:

use roa_core::{App, Context, Result};
use roa_router::put;

async fn end(ctx: &mut Context<()>) -> Result {
    Ok(())
}

let app = App::new(()).end(put(end));