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

Method new

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

mapMethod · 0.80
insertMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected