Class: Rust::Types::F32
- Defined in:
- lib/rust_require/types/primitives.rb
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
- #c_input_conversion(name) ⇒ Object
- #c_output_conversion(name) ⇒ Object
-
#c_type ⇒ Object
Ruby Floats are always f64.
- #ffi_type ⇒ Object
Methods inherited from Type
#c_input_type, #c_output_type, #ffi_input_type, #ffi_output_type, #initialize, #ruby_input_conversion, #ruby_output_conversion, rust_type, #rust_type_regex
Constructor Details
This class inherits a constructor from Rust::Types::Type
Instance Method Details
#c_input_conversion(name) ⇒ Object
50 |
# File 'lib/rust_require/types/primitives.rb', line 50 def c_input_conversion(name); "#{name} as f32"; end |
#c_output_conversion(name) ⇒ Object
51 |
# File 'lib/rust_require/types/primitives.rb', line 51 def c_output_conversion(name); "#{name} as f64"; end |
#c_type ⇒ Object
Ruby Floats are always f64
49 |
# File 'lib/rust_require/types/primitives.rb', line 49 def c_type; 'f64'; end |
#ffi_type ⇒ Object
53 |
# File 'lib/rust_require/types/primitives.rb', line 53 def ffi_type; :double; end |