https://github.com/avitex/rust-aliasable
Rust library providing basic aliasable (non `core::ptr::Unique`) types
https://github.com/avitex/rust-aliasable
noalias rust-lang
Last synced: about 1 month ago
JSON representation
Rust library providing basic aliasable (non `core::ptr::Unique`) types
- Host: GitHub
- URL: https://github.com/avitex/rust-aliasable
- Owner: avitex
- License: mit
- Created: 2020-12-04T04:07:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-03T15:35:27.000Z (over 3 years ago)
- Last Synced: 2025-04-11T12:54:47.284Z (about 2 months ago)
- Topics: noalias, rust-lang
- Language: Rust
- Homepage:
- Size: 91.8 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/avitex/rust-aliasable/actions?query=workflow:build)
[](https://codecov.io/gh/avitex/rust-aliasable)
[](https://crates.io/crates/aliasable)
[](https://docs.rs/aliasable)# rust-aliasable
**Rust library providing basic aliasable (non `core::ptr::Unique`) types**
Documentation hosted on [docs.rs](https://docs.rs/aliasable).```toml
aliasable = "0.1"
```## Why?
Used for escaping `noalias` when multiple raw pointers may point to the same
data.## Goals
`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).## Usage
```rust
use aliasable::vec::AliasableVec;// Re-exported via `aliasable::vec::UniqueVec`
let unique = Vec::from(&[1, 2, 3][..]);
let aliasable = AliasableVec::from(unique);
```