viewBufferAsStruct<S extends Struct> method
view as ffi.Struct must be on full length or Struct.create will throw
view as full length, including invalid data.
a buffer backing larger than all potential calls is expected to be allocated at initialization
Implementation
S? viewBufferAsStruct<S extends Struct>(TypedDataCaster<S> caster) => caster(bufferAsBytes);