Function tari_wallet_ffi::contact_create[][src]

#[no_mangle]pub unsafe extern "C" fn contact_create(
    alias: *const c_char,
    public_key: *mut TariPublicKey,
    error_out: *mut c_int
) -> *mut TariContact

----------------------------------- Contact -------------------------------------------------/// Creates a TariContact

Arguments

alias - The pointer to a char array public_key - The pointer to a TariPublicKey error_out - Pointer to an int which will be modified to an error code should one occur, may not be null. Functions as an out parameter.

Returns

*mut TariContact - Returns a pointer to a TariContact. Note that it returns ptr::null_mut() if alias is null or if pk is null

Safety

The contact_destroy method must be called when finished with a TariContact