MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / value_to_str

Function value_to_str

debugger/src/value/writer.rs:651–656  ·  view source on GitHub ↗
(v: &'a SBValue)

Source from the content-addressed store, hash-verified

649}
650
651fn value_to_str<'a>(v: &'a SBValue) -> Result<&'a str> {
652 match v.value() {
653 Some(s) => s.to_str().map_err(|_| WriteErr),
654 None => Err(WriteErr),
655 }
656}
657
658pub(crate) fn value_to_bytes<const N: usize>(v: &SBValue) -> Result<[u8; N]> {
659 let mut bytes = [0; N];

Callers 1

enumerate_valueFunction · 0.85

Calls 2

to_strMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected