Class: Aws::Crt::Native::CrtBuf

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/aws-crt/native.rb

Overview

Warning, when used as an output structure the memory in ptr needs to be manually destructed!

Instance Method Summary collapse

Instance Method Details

#to_blobObject



18
19
20
21
22
# File 'lib/aws-crt/native.rb', line 18

def to_blob
  return unless (self[:len]).positive? && !(self[:ptr]).null?

  self[:ptr].read_array_of_char(self[:len])
end