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

Method write_result

debugger/src/debugger.rs:1090–1108  ·  view source on GitHub ↗
(
        &mut self,
        rwriter: &mut RValueWriter,
        name: &str,
        ty: &str,
        ok: bool,
        val: Bytes,
    )

Source from the content-addressed store, hash-verified

1088 }
1089
1090 fn write_result(
1091 &mut self,
1092 rwriter: &mut RValueWriter,
1093 name: &str,
1094 ty: &str,
1095 ok: bool,
1096 val: Bytes,
1097 ) {
1098 let result_enum = UnionType {
1099 name: trim_type_name(ty),
1100 variants: vec!["Ok".to_owned(), "Err".to_owned()],
1101 };
1102 let bytes = rwriter.union_v(
1103 &result_enum,
1104 if ok { 0 } else { 1 },
1105 [("0".to_owned(), val)].into_iter(),
1106 );
1107 self.write_value(rwriter, name, bytes.as_bytes());
1108 }
1109
1110 fn write_option(
1111 &mut self,

Callers 1

write_return_valueFunction · 0.80

Calls 4

trim_type_nameFunction · 0.85
as_bytesMethod · 0.80
union_vMethod · 0.45
write_valueMethod · 0.45

Tested by

no test coverage detected