eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
778 stars 28 forks source link

Introduce `Capacity` type #142

Closed elfenpiff closed 6 months ago

elfenpiff commented 6 months ago

(Code) Example Of Cumbersome API

Fixed size containers often have a capacity member variable that is never changed during their lifetime. A custom strong type that can be only set once with new and can be read via Deref would reflect this in the API.

Improvement Suggestion

elfenpiff commented 6 months ago

@elBoberido I think I would close the issue without fixing it, since such a type would have severe drawbacks.

We can implement clone by hand, but loosing copy would be a pity.

elBoberido commented 6 months ago

@elfenpiff fine with me