MCPcopy Create free account
hub / github.com/bootc-dev/bootc / find

Method find

crates/kernel_cmdline/src/utf8.rs:122–125  ·  view source on GitHub ↗

Locate a kernel argument with the given key name. Returns the first parameter matching the given key, or `None` if not found. Key comparison treats dashes and underscores as equivalent.

(&'a self, key: &T)

Source from the content-addressed store, hash-verified

120 /// Returns the first parameter matching the given key, or `None` if not found.
121 /// Key comparison treats dashes and underscores as equivalent.
122 pub fn find<T: AsRef<str> + ?Sized>(&'a self, key: &T) -> Option<Parameter<'a>> {
123 let key = ParameterKey::from(key.as_ref());
124 self.iter().find(|p| p.key() == key)
125 }
126
127 /// Find all kernel arguments starting with the given UTF-8 prefix.
128 ///

Callers 15

next_tokenMethod · 0.45
spawn_editorFunction · 0.45
install_via_ziplFunction · 0.45
soft_reboot_stagedFunction · 0.45
composefs_gcFunction · 0.45
validate_updateFunction · 0.45

Calls 3

as_refMethod · 0.45
iterMethod · 0.45
keyMethod · 0.45

Tested by 6

test_parse_lsblk_swraidFunction · 0.36
test_non_ostreeFunction · 0.36
test_find_strFunction · 0.36