(mut self, method: M)
| 39 | } |
| 40 | |
| 41 | pub fn with_protocol<M>(mut self, method: M) -> Self |
| 42 | where |
| 43 | M: LspsProtocol, |
| 44 | { |
| 45 | let proto = method.protocol(); |
| 46 | self.supported_protocols.push(proto); |
| 47 | method.register_handler(&mut self.router_builder); |
| 48 | self |
| 49 | } |
| 50 | |
| 51 | pub fn build(mut self) -> LspsService { |
| 52 | self.supported_protocols.sort(); |