id_sys 0.1.0

Provides data structures which can be marked such that they only work with similarly marked integer data types.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::{internal::Sealed, MutIdPtr};

pub trait MutPtrExt<TValue>: Sealed {
    fn to_mut_id_ptr<TMarker: ?Sized>(self) -> MutIdPtr<TMarker, TValue>;
}

impl<TValue> MutPtrExt<TValue> for *mut TValue {
    fn to_mut_id_ptr<TMarker: ?Sized>(self) -> MutIdPtr<TMarker, TValue> {
        MutIdPtr::from_mut_ptr(self)
    }
}