hedera 0.1.0

Hedera SDK for Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::AccountId;
use libc::c_char;
use std::ffi::CStr;

#[doc(hidden)]
#[no_mangle]
pub unsafe extern "C" fn hedera_account_id_from_str(s: *const c_char, out: *mut AccountId) -> u64 {
    debug_assert!(!s.is_null());
    debug_assert!(!out.is_null());

    let s = CStr::from_ptr(s);
    let s = s.to_string_lossy();

    *out = try_ffi!(s.parse());

    0
}