Documentation
¶
Index ¶
- Constants
- func ProbeABI(handle uintptr, lookup SymbolLookup) (uint32, error)
- type ArrayIter
- type Bindings
- func (b *Bindings) ABI() (uint32, int32)
- func (b *Bindings) ArrayIterNew(view *ValueView) (ArrayIter, int32)
- func (b *Bindings) ArrayIterNext(iter *ArrayIter) (ValueView, bool, int32)
- func (b *Bindings) BytesFree(ptr *byte, length uintptr) int32
- func (b *Bindings) DocFree(doc DocHandle) int32
- func (b *Bindings) DocRoot(doc DocHandle) (ValueView, int32)
- func (b *Bindings) ElementGetBigInt(view *ValueView) (string, int32)
- func (b *Bindings) ElementGetBool(view *ValueView) (bool, int32)
- func (b *Bindings) ElementGetFloat64(view *ValueView) (float64, int32)
- func (b *Bindings) ElementGetInt64(view *ValueView) (int64, int32)
- func (b *Bindings) ElementGetString(view *ValueView) (string, int32)
- func (b *Bindings) ElementGetUint64(view *ValueView) (uint64, int32)
- func (b *Bindings) ElementIsNull(view *ValueView) (bool, int32)
- func (b *Bindings) ElementType(view *ValueView) (uint32, int32)
- func (b *Bindings) HasInternalMaterializeBuild() bool
- func (b *Bindings) HasNativeAllocStats() bool
- func (b *Bindings) ImplementationName() (string, int32)
- func (b *Bindings) InternalMaterializeBuild(view *ValueView) ([]InternalFrame, int32)
- func (b *Bindings) LockImplementationSelection() int32
- func (b *Bindings) NativeAllocStatsReset() int32
- func (b *Bindings) NativeAllocStatsSnapshot() (NativeAllocStats, int32)
- func (b *Bindings) ObjectGetField(view *ValueView, key string) (ValueView, int32)
- func (b *Bindings) ObjectIterNew(view *ValueView) (ObjectIter, int32)
- func (b *Bindings) ObjectIterNext(iter *ObjectIter) (ValueView, ValueView, bool, int32)
- func (b *Bindings) ParserFree(parser ParserHandle) int32
- func (b *Bindings) ParserLastError(parser ParserHandle) (string, int32)
- func (b *Bindings) ParserLastErrorHasOffset(parser ParserHandle) (bool, int32)
- func (b *Bindings) ParserLastErrorOffset(parser ParserHandle) (uint64, int32)
- func (b *Bindings) ParserNew() (ParserHandle, int32)
- func (b *Bindings) ParserNewConfigured(maxCapacity uint64, maxDepth uint32) (ParserHandle, int32)
- func (b *Bindings) ParserParse(parser ParserHandle, data []byte) (DocHandle, int32)
- func (b *Bindings) SetImplementation(name string) int32
- type DocHandle
- type ErrorCode
- type InternalFrame
- type NativeAllocStats
- type ObjectIter
- type ParserHandle
- type SymbolLookup
- type ValueKind
- type ValueView
Constants ¶
View Source
const ( // ABIVersion encodes the expected native ABI as 0xMMMMmmmm (16-bit major, // 16-bit minor). It must match PURE_SIMDJSON_ABI_VERSION exported by the // Rust shim; bumping major signals a breaking C-ABI change. ABIVersion uint32 = 0x00010002 LastErrorOffsetUnknown uint64 = ^uint64(0) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bindings ¶
type Bindings struct {
// contains filtered or unexported fields
}
func (*Bindings) ArrayIterNext ¶
func (*Bindings) ElementGetBigInt ¶ added in v0.1.5
func (*Bindings) ElementGetFloat64 ¶
func (*Bindings) ElementGetInt64 ¶
func (*Bindings) ElementGetString ¶
func (*Bindings) ElementGetUint64 ¶
func (*Bindings) HasInternalMaterializeBuild ¶
func (*Bindings) HasNativeAllocStats ¶
func (*Bindings) ImplementationName ¶
func (*Bindings) InternalMaterializeBuild ¶
func (b *Bindings) InternalMaterializeBuild(view *ValueView) ([]InternalFrame, int32)
InternalMaterializeBuild returns a borrowed frame span whose backing storage lives in the C++ doc (psimdjson_doc::materialize_frames). The caller must consume or copy out of the slice before the next InternalMaterializeBuild call on the same doc, which clears and reuses that buffer. Keep the owning doc alive (runtime.KeepAlive) for the full duration of any read of the returned span.
func (*Bindings) LockImplementationSelection ¶ added in v0.1.5
func (*Bindings) NativeAllocStatsReset ¶
func (*Bindings) NativeAllocStatsSnapshot ¶
func (b *Bindings) NativeAllocStatsSnapshot() (NativeAllocStats, int32)
func (*Bindings) ObjectGetField ¶
func (*Bindings) ObjectIterNew ¶
func (b *Bindings) ObjectIterNew(view *ValueView) (ObjectIter, int32)
func (*Bindings) ObjectIterNext ¶
func (*Bindings) ParserFree ¶
func (b *Bindings) ParserFree(parser ParserHandle) int32
func (*Bindings) ParserLastError ¶
func (b *Bindings) ParserLastError(parser ParserHandle) (string, int32)
func (*Bindings) ParserLastErrorHasOffset ¶ added in v0.1.5
func (b *Bindings) ParserLastErrorHasOffset(parser ParserHandle) (bool, int32)
func (*Bindings) ParserLastErrorOffset ¶
func (b *Bindings) ParserLastErrorOffset(parser ParserHandle) (uint64, int32)
func (*Bindings) ParserNew ¶
func (b *Bindings) ParserNew() (ParserHandle, int32)
func (*Bindings) ParserNewConfigured ¶ added in v0.1.5
func (b *Bindings) ParserNewConfigured(maxCapacity uint64, maxDepth uint32) (ParserHandle, int32)
func (*Bindings) ParserParse ¶
func (b *Bindings) ParserParse(parser ParserHandle, data []byte) (DocHandle, int32)
func (*Bindings) SetImplementation ¶ added in v0.1.5
type ErrorCode ¶
type ErrorCode int32
const ( // Values in this block must stay in lockstep with pure_simdjson.h and // src/lib.rs; they are part of the cross-ABI error contract. OK ErrorCode = 0 ErrInvalidArg ErrorCode = 1 ErrInvalidHandle ErrorCode = 2 ErrParserBusy ErrorCode = 3 ErrWrongType ErrorCode = 4 ErrElementNotFound ErrorCode = 5 ErrBufferTooSmall ErrorCode = 6 ErrNotImplemented ErrorCode = 7 ErrDepthLimit ErrorCode = 8 ErrCapacityLimit ErrorCode = 9 ErrKernelLocked ErrorCode = 10 ErrInvalidJSON ErrorCode = 32 ErrNumberOutOfRange ErrorCode = 33 ErrPrecisionLoss ErrorCode = 34 ErrCPUUnsupported ErrorCode = 64 ErrABIMismatch ErrorCode = 65 ErrPanic ErrorCode = 96 ErrCPPException ErrorCode = 97 ErrInternal ErrorCode = 127 )
type InternalFrame ¶
type NativeAllocStats ¶
type ObjectIter ¶
type ParserHandle ¶
type ParserHandle uint64
type ValueKind ¶
type ValueKind uint32
const ( ValueKindInvalid ValueKind = 0 ValueKindNull ValueKind = 1 ValueKindBool ValueKind = 2 ValueKindInt64 ValueKind = 3 ValueKindUint64 ValueKind = 4 ValueKindFloat64 ValueKind = 5 ValueKindString ValueKind = 6 ValueKindArray ValueKind = 7 ValueKindObject ValueKind = 8 ValueKindBigInt ValueKind = 9 )
Click to show internal directories.
Click to hide internal directories.