MCPcopy Create free account
hub / github.com/ElementsProject/lightning / with_protocol

Method with_protocol

plugins/lsps-plugin/src/core/server.rs:41–49  ·  view source on GitHub ↗
(mut self, method: M)

Source from the content-addressed store, hash-verified

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();

Callers 5

newMethod · 0.80
test_protocols_sortedFunction · 0.80
test_protocols_dedupedFunction · 0.80

Calls 2

protocolMethod · 0.45
register_handlerMethod · 0.45

Tested by 4

test_protocols_sortedFunction · 0.64
test_protocols_dedupedFunction · 0.64