pub struct ApiDef {
pub pattern: &'static str,
pub source: &'static str,
pub handlers: Vec<(Method, fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>)>,
pub middleware: Vec<fn(Request, Next) -> Pin<Box<dyn Future<Output = Response> + Send>>>,
}Fields§
§pattern: &'static str§source: &'static str§handlers: Vec<(Method, fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>)>§middleware: Vec<fn(Request, Next) -> Pin<Box<dyn Future<Output = Response> + Send>>>Auto Trait Implementations§
impl Forget for ApiDef
impl Freeze for ApiDef
impl Move for ApiDef
impl RefUnwindSafe for ApiDef
impl Send for ApiDef
impl Sync for ApiDef
impl Unpin for ApiDef
impl UnsafeUnpin for ApiDef
impl UnwindSafe for ApiDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more