Attribute Macro worker_route::patch

source ·
#[patch]
Expand description

A macro that creates route handler with worker::Router::patch_async.

Usage

 #[patch("path")]

Attributes

  • "path": Worker’s path.

Examples

use worker::{Result, Response};
use worker_route::patch;

#[patch("/path")]
async fn foo() -> Result<Response>{
    Response::empty()
}