Type Alias LStrOwned

Source
pub type LStrOwned = OwnedUHandle<LStr>;
Expand description

Definition of an owned LStr Handle.

Aliased Type§

pub struct LStrOwned(/* private fields */);

Implementations§

Source§

impl LStrOwned

Source

pub fn empty_string() -> Result<Self>

Create a new owned LStr with a size of zero.

Source

pub fn from_data(data: &[u8]) -> Result<Self>

§Example
use labview_interop::types::{LStrHandle, LStrOwned};
use labview_interop::types::LVStatusCode;
#[no_mangle]
pub extern "C" fn hello_world(mut strn: String, output_string: *mut LStrHandle) {
   let handle = LStrOwned::from_data(strn.as_bytes()).unwrap();
   unsafe {
       handle.clone_into_pointer(output_string).unwrap();
   }
}