You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apart from the MaxSize experimental feature I'd love to see a MinSize as well.
This can be useful if you want to have a "counter" buffer which keeps track of the maximum number of items that might be able to fit in a given buffer.
E.g. I have a buffer of 4 KiB and I'd like to know what's the maximum number of messages that can fit inside.
This buffer contains embedded_sdmmc::Blocks inside so it's not a continues buffer of bytes and I'm using a second buffer to keep track of how much each block is filled.
The text was updated successfully, but these errors were encountered:
I somewhat plan to rework MaxSize as part of postcard-schema, as I believe it is possible to calculate this as a const fn. See #179 for an example of this.
One edge case I can think of is how to handle "infinite" cases, as () is serialized as zero bytes on the wire, so your function needs to be careful not to divide by zero :)
Hmm that's an interesting case actually heh.
Well I do have a "protocol" level crate although I only (currently) use it with 1 enum that hosts all the messages and it doesn't have a unit type.
Apart from the MaxSize experimental feature I'd love to see a MinSize as well.
This can be useful if you want to have a "counter" buffer which keeps track of the maximum number of items that might be able to fit in a given buffer.
E.g. I have a buffer of 4 KiB and I'd like to know what's the maximum number of messages that can fit inside.
This buffer contains
embedded_sdmmc::Block
s inside so it's not a continues buffer of bytes and I'm using a second buffer to keep track of how much each block is filled.The text was updated successfully, but these errors were encountered: