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

Method find

crates/kernel_cmdline/src/bytes.rs:150–153  ·  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

148 /// Returns the first parameter matching the given key, or `None` if not found.
149 /// Key comparison treats dashes and underscores as equivalent.
150 pub fn find<T: AsRef<[u8]> + ?Sized>(&'a self, key: &T) -> Option<Parameter<'a>> {
151 let key = ParameterKey(key.as_ref());
152 self.iter().find(|p| p.key == key)
153 }
154
155 /// Locate a kernel argument with the given key name.
156 ///

Callers 3

find_utf8Method · 0.45
value_ofMethod · 0.45

Calls 3

ParameterKeyClass · 0.70
as_refMethod · 0.45
iterMethod · 0.45

Tested by 1