MCPcopy Create free account
hub / github.com/Snapchat/Valdi / bytesViewFromDataRef

Function bytesViewFromDataRef

valdi_core/src/valdi_core/cpp/Utils/DjinniUtils.cpp:45–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45Valdi::BytesView bytesViewFromDataRef(const djinni::DataRef& dataRef) {
46 auto dataRefSimpleRef = Valdi::makeShared<DataRefSimpleRef>(dataRef);
47 return Valdi::BytesView(dataRefSimpleRef, dataRef.buf(), dataRef.len());
48}
49
50djinni::DataRef dataRefFromBytesView(const Valdi::BytesView& bytesView) {
51 auto existingDataRef = castOrNull<DataRefSimpleRef>(bytesView.getSource());

Callers

nothing calls this directly

Calls 3

BytesViewClass · 0.70
bufMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected