Class: Rust::Slice
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Rust::Slice
- Defined in:
- lib/rust_require/types.rb
Overview
a rust fat pointer
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from(start, len) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rust_require/types.rb', line 7 def self.from(start, len) s = new s[:ptr] = start s[:len] = len s end |
Instance Method Details
#unpack ⇒ Object
14 15 16 |
# File 'lib/rust_require/types.rb', line 14 def unpack [self[:ptr], self[:len]] end |