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

Method find_all_starting_with

crates/kernel_cmdline/src/bytes.rs:178–184  ·  view source on GitHub ↗

Find all kernel arguments starting with the given prefix. This is a variant of [`Self::find`].

(
        &'a self,
        prefix: &'a T,
    )

Source from the content-addressed store, hash-verified

176 ///
177 /// This is a variant of [`Self::find`].
178 pub fn find_all_starting_with<T: AsRef<[u8]> + ?Sized>(
179 &'a self,
180 prefix: &'a T,
181 ) -> impl Iterator<Item = Parameter<'a>> + 'a {
182 self.iter()
183 .filter(move |p| p.key.0.starts_with(prefix.as_ref()))
184 }
185
186 /// Locate the value of the kernel argument with the given key name.
187 ///

Callers 1

test_find_allFunction · 0.45

Calls 2

iterMethod · 0.45
as_refMethod · 0.45

Tested by 1

test_find_allFunction · 0.36