1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// lib.rs
// Aldaron's Memory Interface ( ami )
// Copyright 2017 (c) Aldaron's Tech
// Copyright 2017 (c) Jeron Lau
// Licensed under the MIT LICENSE

//! Aldaron's Memory Interface is a library for manipulating memory.

#![doc(html_logo_url = "http://at.plopgrizzly.tech/ami/icon.png",
       html_favicon_url = "http://at.plopgrizzly.tech/ami/icon.png",
       html_root_url = "http://at.plopgrizzly.tech/ami/")]

#![no_std] // No Standard Library.

#[deprecated(since = "0.4.0", note = "Use *mut Void instead.")]
pub mod void_pointer;
#[deprecated(since = "0.4.0", note = "Use RawData::transmute instead.")]
pub mod repurpose;

mod vec;
mod void;

pub use void::*;
pub use vec::*;

/// Get the size of type `T`, in bytes.
#[inline(always)]
pub fn size_of<T>() -> usize {
	::core::mem::size_of::<T>()
}