Crate align_address

source ·
Expand description

This crate provides functions for aligning addresses.

Align is implemented for all unsigned integers and provides methods for:

This crate is based on work from the x86_64 crate, but is available for all architectures and all unsigned integer types.

§Examples

use align_address::Align;

assert_eq!(123_u64.align_up(2), 124);

Traits§

  • An adress that can be aligned.

Functions§