Comment by accelbred 2 months ago That works for functions. For datatypes that are used throughout the API, it does not work so well. 2 comments accelbred Reply dwattttt 2 months ago Wouldn't a data type with no safe method of construction satisfy that? You can only get one by calling an unsafe function & satisfying its constraints. accelbred 2 months ago That would be possible but also make its usage unergonomic and not the experience customers are expecting when requesting a Rust API.
dwattttt 2 months ago Wouldn't a data type with no safe method of construction satisfy that? You can only get one by calling an unsafe function & satisfying its constraints. accelbred 2 months ago That would be possible but also make its usage unergonomic and not the experience customers are expecting when requesting a Rust API.
accelbred 2 months ago That would be possible but also make its usage unergonomic and not the experience customers are expecting when requesting a Rust API.
Wouldn't a data type with no safe method of construction satisfy that? You can only get one by calling an unsafe function & satisfying its constraints.
That would be possible but also make its usage unergonomic and not the experience customers are expecting when requesting a Rust API.