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

Function take_native_error

packages/server/src/transport/webrtc.rs:1610–1620  ·  view source on GitHub ↗
(error: *mut i8, fallback: &str)

Source from the content-addressed store, hash-verified

1608}
1609
1610unsafe fn take_native_error(error: *mut i8, fallback: &str) -> AppError {
1611 if error.is_null() {
1612 return AppError::native(fallback);
1613 }
1614 let message = CStr::from_ptr(error)
1615 .to_str()
1616 .map(ToOwned::to_owned)
1617 .unwrap_or_else(|_| fallback.to_owned());
1618 ffi::xcw_native_free_string(error);
1619 AppError::native(message)
1620}
1621
1622fn android_webrtc_poll_interval() -> Duration {
1623 let fps = std::env::var("SIMDECK_ANDROID_SHARED_VIDEO_POLL_FPS")

Callers 2

create_native_encoderMethod · 0.85

Calls 1

xcw_native_free_stringFunction · 0.85

Tested by

no test coverage detected