platform-cast 0.1.0

Platform-specific safe cast.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# platform-cast [![Latest Version]][crates.io] [![API Docs]][docs.rs]

[Latest Version]: https://img.shields.io/crates/v/platform-cast.svg
[crates.io]: https://crates.io/crates/platform-cast
[API Docs]: https://img.shields.io/docsrs/platform-cast.svg
[docs.rs]: https://docs.rs/platform-cast

Platform-specific safe cast.

|                           | `From`   | `TryFrom`   | `as` cast | `CastFrom` |
| ------------------------- | -------- | ----------- | --------- | ---------- |
| No runtime check          |||||
| `usize` <-> `u64`[^a]     |||||
| No truncation             |||||
| No change of sign         |||||

[^a]: Assuming a target with a pointer width of 64.