pub struct Endpoint {
pub path: String,
pub method: Method,
pub handlers: Vec<Handler>,
}Expand description
Represents an HTTP endpoint with a path, method, and handlers
Fields§
§path: String§method: Method§handlers: Vec<Handler>Implementations§
Source§impl Endpoint
impl Endpoint
pub fn new(path: impl Into<String>, method: Method) -> Self
pub fn with_handler(self, handler: Handler) -> Self
pub fn with_handlers(self, handlers: impl IntoIterator<Item = Handler>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Endpoint
impl !RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl !UnwindSafe for Endpoint
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