func (async *AsyncBox) Insert(object interface{}) (id uint64, err error) {
	return async.put(object, cPutModeInsert)
}
Insert a single object asynchronously.
The ID property on the passed object will be assigned a new ID the entity would hold if the insert is ultimately
successful. The newly assigned ID may not become valid if the insert fails.
Fails silently if an object with the same ID already exists (this error is not returned).
package objectbox
import "C"
import (
	"errors"
	"unsafe"
)
type AsyncBox struct {
	box    *Box
	cAsync *C.OBX_async
	cOwned bool  
}
func NewAsyncBox(ob *ObjectBox, entityId TypeId, timeoutMs uint64) (*AsyncBox, error) {
	var async = &AsyncBox{
		box:    ob.InternalBox(entityId),
		cOwned: true,
	}
	if err := cCallBool(func() bool {
		async.cAsync = C.obx_async_create(async.box.cBox, C.uint64_t(timeoutMs))
		return async.cAsync != nil
	}); err != nil {
		return nil, err
	}
	return async, nil
}
func (async *AsyncBox) Close() error {
	if !async.cOwned || async.cAsync == nil {
		return nil
	}
	var cAsync = async.cAsync
	async.cAsync = nil
	return cCall(func() C.obx_err {
		return C.obx_async_close(cAsync)
	})
}
func (async *AsyncBox) put(object interface{}, mode int) (uint64, error) {
	entity := async.box.entity
	idFromObject, err := entity.binding.GetId(object)
	if err != nil {
		return 0, err
	}
	if entity.hasRelations {
		return 0, errors.New("asynchronous Put/Insert/Update is currently not supported on entities that have" +
			" relations because it could result in partial inserts/broken relations")
	}
	id, err := async.box.idForPut(idFromObject)
	if err != nil {
		return 0, err
	}
	err = async.box.withObjectBytes(object, id, func(bytes []byte) error {
		return cCall(func() C.obx_err {
			return C.obx_async_put5(async.cAsync, C.obx_id(id), unsafe.Pointer(&bytes[0]), C.size_t(len(bytes)),
				C.OBXPutMode(mode))
		})
	})
	if err != nil {
		return 0, err
	}
	if idFromObject != id {
		entity.binding.SetId(object, id)
	}
	return id, nil
}
func (async *AsyncBox) Put(object interface{}) (id uint64, err error) {
	return async.put(object, cPutModePut)
}