Trait cargonauts::router::Router [] [src]

pub trait Router {
    type Response: Response;
    fn attach_delete<F>(&mut self, resource: &'static str, f: F) where F: Fn(String) -> Self::Response;
    fn attach_get<F>(&mut self, resource: &'static str, f: F) where F: Fn(GetRequest) -> Self::Response;
    fn attach_index<F>(&mut self, resource: &'static str, f: F) where F: Fn(IndexRequest) -> Self::Response;
    fn attach_patch<F>(&mut self, resource: &'static str, f: F) where F: Fn(PatchRequest) -> Self::Response;
    fn attach_post<F>(&mut self, resource: &'static str, f: F) where F: Fn(PostRequest) -> Self::Response;
    fn attach_fetch_one<F>(&mut self,
                       resource: &'static str,
                       relationship: &'static str,
                       f: F) where F: Fn(GetRequest) -> Self::Response; fn attach_fetch_many<F>(&mut self,
                        resource: &'static str,
                        relationship: &'static str,
                        f: F) where F: Fn(GetRequest) -> Self::Response; fn attach_fetch_rel<F>(&mut self,
                       resource: &'static str,
                       relationship: &'static str,
                       f: F) where F: Fn(String) -> Self::Response; fn attach_delete_one<F>(&mut self,
                        resource: &'static str,
                        relationship: &'static str,
                        f: F) where F: Fn(String) -> Self::Response; fn attach_delete_one_rel<F>(&mut self,
                            resource: &'static str,
                            relationship: &'static str,
                            f: F) where F: Fn(String) -> Self::Response; fn attach_remove_many<F>(&mut self,
                         resource: &'static str,
                         relationship: &'static str,
                         f: F) where F: Fn(String, Vec<String>) -> Self::Response; fn attach_remove_many_rel<F>(&mut self,
                             resource: &'static str,
                             relationship: &'static str,
                             f: F) where F: Fn(String, Vec<String>) -> Self::Response; fn attach_clear_many<F>(&mut self,
                        resource: &'static str,
                        relationship: &'static str,
                        f: F) where F: Fn(String) -> Self::Response; fn attach_clear_many_rel<F>(&mut self,
                            resource: &'static str,
                            relationship: &'static str,
                            f: F) where F: Fn(String) -> Self::Response; fn attach_patch_one<F>(&mut self,
                       resource: &'static str,
                       relationship: &'static str,
                       f: F) where F: Fn(PatchRequest) -> Self::Response; fn attach_post_one<F>(&mut self,
                      resource: &'static str,
                      relationship: &'static str,
                      f: F) where F: Fn(String, PostRequest) -> Self::Response; fn attach_append_many<F>(&mut self,
                         resource: &'static str,
                         relationship: &'static str,
                         f: F) where F: Fn(String, PostRequest) -> Self::Response; fn attach_link_one<F>(&mut self,
                      resource: &'static str,
                      relationship: &'static str,
                      _: F) where F: Fn(String, Relationship) -> Self::Response; fn attach_append_link_many<F>(&mut self,
                              resource: &'static str,
                              relationship: &'static str,
                              f: F) where F: Fn(String, Relationship) -> Self::Response; fn attach_replace_link_many<F>(&mut self,
                               resource: &'static str,
                               relationship: &'static str,
                               f: F) where F: Fn(String, Relationship) -> Self::Response; }

Associated Types

Required Methods

Implementors