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

Method deref

crates/kernel_cmdline/src/utf8.rs:220–224  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

218 type Target = str;
219
220 fn deref(&self) -> &Self::Target {
221 // SAFETY: We know this is valid UTF-8 since we only
222 // construct the underlying `bytes` from valid UTF-8
223 str::from_utf8(&self.0).expect("We only construct the underlying bytes from valid UTF-8")
224 }
225}
226
227impl<'a, T> AsRef<T> for Cmdline<'a>

Callers 2

as_refMethod · 0.45
try_fromMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected