Open jamesmunns opened 4 years ago
In particular, we should show:
static
scopecmim
's Move containerGrantR
/GrantW
in an Option<GrantX<'static, U32>>
with RTFM's Resources or something like cmim
's Move containerAs a side question; would also be nice to see some examples/docs on how to use this for not just basic bytes, but storing stuff like structs
As a newish Rust programmer, the current example's line static BB: BBBuffer<U6> = BBBuffer( ConstBBBuffer::new() );
was a bit confusing due to the implicit use of generic-array.
@ianrrees I also found the same thing
As a note @maraisr, I don't plan to have BBQueue support non-byte (e.g. arrays of u8
s) data. It does not currently manage things like alignment, so it wouldn't work as a general purpose struct storage item. You could use it with something like serde
or postcard
if you need to send things across the wire.
In the future, I will be removing the Generic Array usage, you can take a peek at the next generation docs if you want to see what that will look like!
This "next gen" branch will be merged when min_const_generics lands in the next release or two.
We should have more complete examples for common use cases, including (at least):
CC #54 / @justacec