Add a FromStr implementation for MemorySize.
The parsing should account for the following:
- String pattern should be
<number> <unit> (i.e., 5 B, 42 KiB, 10 GB)
- The space after the number should be optional:
5b == 5 b
- Unit should be case-insensitive:
5b == 5B
Tests should be written for each of these cases.
Add a
FromStrimplementation forMemorySize.The parsing should account for the following:
<number> <unit>(i.e.,5 B,42 KiB,10 GB)5b==5 b5b==5BTests should be written for each of these cases.