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

Method as_str

plugins/src/options.rs:497–505  ·  view source on GitHub ↗

If the `Value` is a String, returns the associated str. Returns None otherwise.

(&self)

Source from the content-addressed store, hash-verified

495 /// If the `Value` is a String, returns the associated str. Returns None
496 /// otherwise.
497 pub fn as_str(&self) -> Option<&str> {
498 match self {
499 Value::String(s) => Some(&s),
500 Value::Integer(_) => None,
501 Value::Boolean(_) => None,
502 Value::StringArray(_) => None,
503 Value::IntegerArray(_) => None,
504 }
505 }
506
507 /// Returns true if the `Value` is an integer between `i64::MIN` and
508 /// `i64::MAX`.

Callers 13

deserializeMethod · 0.80
currencyconvertFunction · 0.80
currencyrateFunction · 0.80
listcurrencyratesFunction · 0.80
check_proxy_configFunction · 0.80
parse_register_path_argsFunction · 0.80
mainFunction · 0.80
handle_initMethod · 0.80
dispatch_oneMethod · 0.80
is_stringMethod · 0.80
parse_hrnFunction · 0.80
setconfig_callbackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected