Closed
Description
At the moment, bytes!()
just converts a string literal into a &[u8]
.
However, to be even more useful for low level stuff it could accept a list of anything reasonably convertible to a list of u8
s, like strings, chars in ascii range, explicit u8
s etc.
Then you could do for example:
bytes!("foo", 0)
- vector of the bytes in "foo" and a null terminator.bytes!('a', 42, 'b', 98, 'c', 255)
- some kind of binary data format.bytes!(" ", ' ', 32)
- a vector of three32u8
.
Metadata
Metadata
Assignees
Labels
No labels