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

Method from

crates/kernel_cmdline/src/bytes.rs:30–32  ·  view source on GitHub ↗

Creates a new `Cmdline` from any type that can be referenced as bytes. Uses borrowed data when possible to avoid unnecessary allocations.

(input: &'a T)

Source from the content-addressed store, hash-verified

28 ///
29 /// Uses borrowed data when possible to avoid unnecessary allocations.
30 fn from(input: &'a T) -> Self {
31 Self(Cow::Borrowed(input.as_ref()))
32 }
33}
34
35impl Deref for Cmdline<'_> {

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected