commit | 6c71cc3835a332225f80cd000480b93488908d53 | [log] [tgz] |
---|---|---|
author | Maurice Lam <yukl@google.com> | Thu Feb 09 21:51:50 2023 +0000 |
committer | Maurice Lam <yukl@google.com> | Thu Feb 09 21:52:34 2023 +0000 |
tree | ad37f0ccb6bc1e2e0d6ca1b305974b6b6a4914b6 | |
parent | e03c0304d7cd1620795cdf4decf1bd4e90304a8a [diff] |
Import aliasable crate Bug: 267375624 Test: None, this CL doesn't add any build files yet Change-Id: I04115d35c7bf19abba9f76bb177a3e2d19069b94
Rust library providing basic aliasable (non core::ptr::Unique
) types
Documentation hosted on docs.rs.
aliasable = "0.1"
Used for escaping noalias
when multiple raw pointers may point to the same data.
aliasable
is not designed to provide a full interface for container types, simply to provide aliasable (non core::ptr::Unique
) alternatives for dereferencing their owned data. When converting from a unique to an aliasable alternative, no data referenced is mutated (one-to-one internal representation aside from the non core::ptr::Unique
pointer).
use aliasable::vec::AliasableVec; // Re-exported via `aliasable::vec::UniqueVec` let unique = Vec::from(&[1, 2, 3][..]); let aliasable = AliasableVec::from(unique);