Compute the serialized size of an object in a slot
Behaviour
- Return the number of bytes the object in the specified slot occupies when serialized
Definition
int64_t slot_size (
uint32_t slot_no
);
Example
int64_t bytes_needed = slot_size(1); // get size of slot 1
Parameters
Name | Type | Description |
---|---|---|
slot_no | uint32_t | The slot number |
Return Code
Type | Description |
---|---|
int64_t | The number of bytes the object occupies when serialized If negative, an error: DOESNT_EXIST - the specified slot does not contain any object or it is an invalid slot |