flapigen 0.11.0

Tool for connecting libraries written in Rust with other languages
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
r##"# [ unsafe ( no_mangle ) ]
 pub extern "C" fn BLAUtils_latitude_to_str ( lat : CRustOptionf64 , plus_sym : CRustStrView , minus_sym : CRustStrView , ) -> CRustString {
 let mut lat : Option < f64 > = if lat . is_some != 0 { let mut ret = unsafe { lat . val . data } ; Some ( ret ) }
 else { None } ;
 let mut plus_sym : & str = unsafe { let slice : & [ u8 ] = :: std :: slice :: from_raw_parts ( plus_sym . data as * const u8 , plus_sym . len ) ; :: std :: str :: from_utf8_unchecked ( slice ) } ;
 let mut minus_sym : & str = unsafe { let slice : & [ u8 ] = :: std :: slice :: from_raw_parts ( minus_sym . data as * const u8 , minus_sym . len ) ; :: std :: str :: from_utf8_unchecked ( slice ) } ;
 let mut ret : String = { format ! ( "{}" , Latitude :: new_with_symbols ( lat , plus_sym . into ( ) , minus_sym . into ( ) ) ) } ;
 let mut ret : CRustString = CRustString :: from_string ( ret ) ;
 ret }"##;

r##"# [ unsafe ( no_mangle ) ]
 pub extern "C" fn BLAUtils_longitude_to_str ( lon : CRustOptionf64 , plus_sym : CRustStrView , minus_sym : CRustStrView , ) -> CRustString {
 let mut lon : Option < f64 > = if lon . is_some != 0 { let mut ret = unsafe { lon . val . data } ; Some ( ret ) } else { None } ;
 let mut plus_sym : & str = unsafe { let slice : & [ u8 ] = :: std :: slice :: from_raw_parts ( plus_sym . data as * const u8 , plus_sym . len ) ; :: std :: str :: from_utf8_unchecked ( slice ) } ;
 let mut minus_sym : & str = unsafe { let slice : & [ u8 ] = :: std :: slice :: from_raw_parts ( minus_sym . data as * const u8 , minus_sym . len ) ; :: std :: str :: from_utf8_unchecked ( slice ) } ;
 let mut ret : String = { format ! ( "{}" , Longitude :: new_with_symbols ( lon , plus_sym . into ( ) , minus_sym . into ( ) ) ) } ;
 let mut ret : CRustString = CRustString :: from_string ( ret ) ;
 ret }"##;