mirror of
https://github.com/Noratrieb/stuff.git
synced 2026-01-14 16:35:08 +01:00
improve docs for backend
This commit is contained in:
parent
6d350a0da3
commit
7bdf2db629
2 changed files with 7 additions and 4 deletions
|
|
@ -9,3 +9,4 @@
|
||||||
* Made `(): StuffingStrategy` generic over all backends (with some trait bounds) instead of just `usize`, `u64`, and `u128`.
|
* Made `(): StuffingStrategy` generic over all backends (with some trait bounds) instead of just `usize`, `u64`, and `u128`.
|
||||||
* Added an MSRV (minimum supported rust version) policy (MSRV of `1.31.0`)
|
* Added an MSRV (minimum supported rust version) policy (MSRV of `1.31.0`)
|
||||||
* Upgraded `sptr` dependency to `0.3.1`
|
* Upgraded `sptr` dependency to `0.3.1`
|
||||||
|
* Improve documentation
|
||||||
|
|
@ -3,9 +3,11 @@ use sptr::Strict;
|
||||||
/// A backend where the stuffed pointer is stored. Must be bigger or equal to the pointer size.
|
/// A backend where the stuffed pointer is stored. Must be bigger or equal to the pointer size.
|
||||||
///
|
///
|
||||||
/// The `Backend` is a trait to define types that store the stuffed pointer. It's supposed to
|
/// The `Backend` is a trait to define types that store the stuffed pointer. It's supposed to
|
||||||
/// be implemented on `Copy` types like `usize`, `u64`, or `u128`. Note that these integers are basically
|
/// be implemented on `Copy` types like `usize`, `u64`, or `u128`. Note that the `Self` type here
|
||||||
/// just the strategy and exchange types for addresses, but *not* the actual underlying storage, which
|
/// serves as the main interchange format between the `Backend` and [`StuffedPtr`](`crate::StuffedPtr`)
|
||||||
/// always contains a pointer to keep provenance (for example `(*mut T, u32)` on 32 bit for `u64`).
|
/// but *not* the actual underlying storage, which always contains a pointer to keep provenance
|
||||||
|
/// (for example `(*mut T, u32)` on 32 bit for `u64`). This implies that `Self` *should* have the same
|
||||||
|
/// size as `Backend::Stored`.
|
||||||
///
|
///
|
||||||
/// This trait is just exposed for convenience and flexibility, you are usually not expected to implement
|
/// This trait is just exposed for convenience and flexibility, you are usually not expected to implement
|
||||||
/// it yourself, although such occasions could occur (for example to have a bigger storage than `u128`
|
/// it yourself, although such occasions could occur (for example to have a bigger storage than `u128`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue