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

Method new

plugins/currencyrate-plugin/src/oracle.rs:36–45  ·  view source on GitHub ↗
(name: &str, url_template: &str, reply_members: Vec<&str>)

Source from the content-addressed store, hash-verified

34}
35impl Source {
36 pub fn new(name: &str, url_template: &str, reply_members: Vec<&str>) -> Self {
37 Source {
38 name: name.to_owned(),
39 url_template: url_template.to_owned(),
40 reply_members: reply_members
41 .into_iter()
42 .map(std::borrow::ToOwned::to_owned)
43 .collect(),
44 }
45 }
46 pub fn url(&self, currency_lc: &str, currency: &str) -> String {
47 self.url_template
48 .replace("{currency_lc}", currency_lc)

Callers

nothing calls this directly

Calls 6

mapMethod · 0.80
to_vecMethod · 0.80
proxyMethod · 0.80
insertMethod · 0.45
buildMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected