Trait pavo_traits::AlignUpwards[][src]

pub trait AlignUpwards {
    fn align_upwards(self, align: Self) -> Self;
}
Expand description

定义将数值向上对齐到指定倍数的契定。

Required methods

fn align_upwards(self, align: Self) -> Self[src]

将数值向上对齐到指定倍数。

Examples

assert_eq!(63.align_upwards(64), 64);
assert_eq!(65.align_upwards(64), 128);

Implementations on Foreign Types

impl AlignUpwards for i8[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for i16[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for i32[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for i64[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for isize[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for u8[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for u16[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for u32[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for u64[src]

fn align_upwards(self, align: Self) -> Self[src]

impl AlignUpwards for usize[src]

fn align_upwards(self, align: Self) -> Self[src]

Implementors