generated from eclipse-score/module_template
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
We need a heap-allocated string which behaves similar to Rust's std::string::String, except that it reserves a fixed-capacity backing store on creation, and doesn't do any reallocations later on. This would be useful for cases where you only want to do memory allocations on startup, to avoid panics or aborts due to reallocations.
Criteria:
- should share the majority of the logic with ABI-compatible string implementation
- unlike the ABI-compatible string, the storage should be on the heap and not inline, so that moving the string is cheap
- the capacity should be determined at runtime, not statically at compile-time
- operations related to the string's capacity (like
push,push_str, andpop) should be non-panicking and return aResultorOptioninstead
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done