#raw-pointers

raw_pointer

Safely handling raw mutable pointers to a generic type

4 releases

0.1.4 Jun 10, 2021
0.1.3 Jun 3, 2021
0.1.2 Jun 3, 2021
0.1.1 May 25, 2021
0.1.0 May 25, 2021

#28 in #raw-pointers

24 downloads per month

MIT license

3KB

raw-pointer

Allows for safely handling raw, mutable pointers to a generic type in Rust.

Usage

Pointer to Data

let mut val: u32 = 6;
let mut ptr_val = Pointer::<u32>::new(&mut val);

*ptr_val = 9;

Pointer to Specific Address

let mut temp_tegister: Pointer<MyRegister> = Pointer::<MyRegister>::from(0xFFFF0000);

test_and_set(temp_register.value);

No runtime deps