static_memory_rs 0.1.2

A fixed-capacity, no_std-friendly memory region with typed read/write access, runtime bounds checks, and alignment verification — ideal for embedded and systems programming.
Documentation
# Region — Fixed‑Size Typed Memory Access for `no_std`


A small, panic‑checked static memory region that provides safe, typed reads and writes with runtime bounds and alignment verification.  
Useful in `no_std` and embedded contexts where you need manual layout control without the unpredictability of the global allocator.

## Features

- `#![no_std]` compatible
- Compile‑time fixed capacity
- Runtime bounds & alignment checks
- Simple API for typed load/store

---

## Example (no_std)


```rust
#![no_std]

#![no_main]


use core::mem::{align_of, size_of};
use my_region_crate::Region;

#[repr(C)]

#[derive(Copy, Clone, Debug)]

struct Header {
    id: u32,
    flags: u16,
}

#[no_mangle]

pub extern "C" fn main() -> ! {
    let mut reg: Region<64> = Region::new();

    // Safe write — offset is aligned to 4 for u32
    reg.write::<u32>(0, 0xDEADBEEF);

    // Safe write — offset is aligned to 4 (Header's max field align)
    reg.write::<Header>(4, Header { id: 42, flags: 3 });

    // Safe read back
    let hdr: Header = reg.read::<Header>(4);
    assert_eq!(hdr.id, 42);

    loop {}
}