pub enum UploadError {
DropListDoesNotFit,
ItemDoesNotFit,
MetadataDoesNotFit,
ArenaIsNotAlive,
}
Expand description
Error while trying to place data in arena block.
Variants§
DropListDoesNotFit
Droplist does not fit in a block.
Arena has drop lists to efficiently execute item drop functions, and they hold around 1000 items at minimum.
Solution: increase block size.
ItemDoesNotFit
Item does not fit in a block.
If there is not enough space in a block, then another block is allocated. This error occurs only if the item is bigger than the maximum possible free space in a block.
Solution: handle this error and do not store items that are too big or increase block size.
MetadataDoesNotFit
Metadata does not fit in a block.
Arena stores its metadata in the first block. This metadata contains pointers to first/last
droplists, memory block (yeah a bit circular here), weak and total reference counts.
This error occurs when this metadata does not fit in a block, and should happen on Arena
initialization only.
Solution: increase block size.
ArenaIsNotAlive
Arena was dropped.
The main Arena
is dropped and the drop function may have been executed for any containing item.
This action is not available.
Solution: ensure arena objects are not accessed after the arena is dropped and handle this error.