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

Method remove

plugins/lsps-plugin/src/core/tlv.rs:147–153  ·  view source on GitHub ↗

Remove a record by type.

(&mut self, type_: u64)

Source from the content-addressed store, hash-verified

145
146 /// Remove a record by type.
147 pub fn remove(&mut self, type_: u64) -> Option<Vec<u8>> {
148 if let Some(pos) = self.0.iter().position(|rec| rec.type_ == type_) {
149 Some(self.0.remove(pos).value)
150 } else {
151 None
152 }
153 }
154
155 /// Check if a type exists.
156 pub fn contains(&self, type_: u64) -> bool {

Callers 15

get_ordered_subtypesMethod · 0.45
wipe_dbMethod · 0.45
drop_unused_portFunction · 0.45
wait_for_logsMethod · 0.45
_del_channelMethod · 0.45
test_tracingFunction · 0.45
matchup_eventsFunction · 0.45
check_inspect_channelFunction · 0.45

Calls

no outgoing calls