Array slices¶
The SDK provides a safe array abstraction which includes a pointer to the data and a length.
-
typedef struct slice_ref_uint8 slice_ref_uint8_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_int8 slice_ref_int8_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_uint16 slice_ref_uint16_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_int16 slice_ref_int16_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_uint32 slice_ref_uint32_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_int32 slice_ref_int32_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_uint64 slice_ref_uint64_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_int64 slice_ref_int64_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_float slice_ref_float_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.
-
typedef struct slice_ref_double slice_ref_double_t¶
&'lt [T]but with a guaranteed#[repr(C)]layout.C layout (for some given type T)¶
typedef struct { // Cannot be NULL T * ptr; size_t len; } slice_T;
Nullable pointer?¶
If you want to support the above typedef, but where the
ptrfield is allowed to beNULL(with the contents oflenthen being undefined) use theOption< slice_ptr<_> >type.