MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / copy_native_shared_bytes

Function copy_native_shared_bytes

packages/server/src/transport/webrtc.rs:1590–1601  ·  view source on GitHub ↗
(bytes: ffi::xcw_native_shared_bytes)

Source from the content-addressed store, hash-verified

1588}
1589
1590unsafe fn copy_native_shared_bytes(bytes: ffi::xcw_native_shared_bytes) -> Option<Bytes> {
1591 let copied = if bytes.data.is_null() || bytes.length == 0 {
1592 None
1593 } else {
1594 Some(Bytes::copy_from_slice(slice::from_raw_parts(
1595 bytes.data,
1596 bytes.length,
1597 )))
1598 };
1599 ffi::xcw_native_release_shared_bytes(bytes);
1600 copied
1601}
1602
1603unsafe fn native_c_string(value: *const i8) -> Option<String> {
1604 if value.is_null() {

Callers 1

handle_encoded_frameMethod · 0.85

Calls 1

Tested by

no test coverage detected