mirror of
https://github.com/Noratrieb/stuff.git
synced 2026-01-14 16:35:08 +01:00
remove confusing enum from readme
This commit is contained in:
parent
c9dac90529
commit
ce214f98bf
2 changed files with 4 additions and 14 deletions
|
|
@ -13,13 +13,8 @@ This crate consists of three parts:
|
||||||
* The trait `Backend`
|
* The trait `Backend`
|
||||||
`StuffedPtr` is the main type of this crate. You it's a type whose size depends on the
|
`StuffedPtr` is the main type of this crate. You it's a type whose size depends on the
|
||||||
choice of `Backend` (defaults to `usize`, `u64` and `u128` are also possible). It can store a
|
choice of `Backend` (defaults to `usize`, `u64` and `u128` are also possible). It can store a
|
||||||
pointer or some extra data, so you can imagine it being
|
pointer or some extra data.
|
||||||
```rust
|
|
||||||
enum StuffedPtr<T, E> {
|
|
||||||
Ptr(*mut T),
|
|
||||||
Extra(E),
|
|
||||||
}
|
|
||||||
```
|
|
||||||
except that the extra data is bitstuffed into the pointer. You can chose any arbitrary bitstuffing
|
except that the extra data is bitstuffed into the pointer. You can chose any arbitrary bitstuffing
|
||||||
depending on the `StuffingStrategy`, an unsafe trait that governs how the extra data
|
depending on the `StuffingStrategy`, an unsafe trait that governs how the extra data
|
||||||
(or the pointer itself) will be packed into the backend.
|
(or the pointer itself) will be packed into the backend.
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,8 @@
|
||||||
//!
|
//!
|
||||||
//! [`StuffedPtr`] is the main type of this crate. You it's a type whose size depends on the
|
//! [`StuffedPtr`] is the main type of this crate. You it's a type whose size depends on the
|
||||||
//! choice of [`Backend`] (defaults to `usize`, `u64` and `u128` are also possible). It can store a
|
//! choice of [`Backend`] (defaults to `usize`, `u64` and `u128` are also possible). It can store a
|
||||||
//! pointer or some extra data, so you can imagine it being
|
//! pointer or some extra data.
|
||||||
//! ```rust
|
//!
|
||||||
//! enum StuffedPtr<T, E> {
|
|
||||||
//! Ptr(*mut T),
|
|
||||||
//! Extra(E),
|
|
||||||
//! }
|
|
||||||
//! ```
|
|
||||||
//! except that the extra data is bitstuffed into the pointer. You can chose any arbitrary bitstuffing
|
//! except that the extra data is bitstuffed into the pointer. You can chose any arbitrary bitstuffing
|
||||||
//! depending on the [`StuffingStrategy`], an unsafe trait that governs how the extra data
|
//! depending on the [`StuffingStrategy`], an unsafe trait that governs how the extra data
|
||||||
//! (or the pointer itself) will be packed into the backend.
|
//! (or the pointer itself) will be packed into the backend.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue