Slice

Holds a pointer returned from leveldb, or passed to leveldb.

Leveldb memory is freed on destruction.

Constructors

this
this(void* p, size_t l, bool free)

Used by DB class to hold leveldb raw pointers

this
this(ref P p)

Takes reference

this
this(P p, size_t l)

Takes reference

Destructor

~this
~this()

Calles free on leveldb raw memory

Members

Functions

opCast
inout(T) opCast()

Slice casting

Properties

as
inout(T) as [@property getter]

Get slice as a data type

length
size_t length [@property getter]

length or size of slice

ok
bool ok [@property getter]

Test is slice is valid

ptr
inout(T) ptr [@property getter]

Get slice pointer

Static functions

Ref
Slice Ref(T t)

Create a safe refrence for slicing, good for primitive type constants

Meta