## PointerArithmetic

# Trait PointerArithmetic

Source

    pub trait PointerArithmetic: HasDataLayout {
        // Provided methods
        fn pointer_size(&self) -> Size { ... }
        fn max_size_of_val(&self) -> Size { ... }
        fn target_usize_max(&self) -> u64 { ... }
        fn target_isize_min(&self) -> i64 { ... }
        fn target_isize_max(&self) -> i64 { ... }
        fn truncate_to_target_usize(&self, val: u64) -> u64 { ... }
        fn sign_extend_to_target_isize(&self, val: u64) -> i64 { ... }
    }

## Provided Methods§

Source

#### fn pointer_size(&self) -> Size

Source

#### fn max_size_of_val(&self) -> Size

Source

#### fn target_usize_max(&self) -> u64

Source

#### fn target_isize_min(&self) -> i64

Source

#### fn target_isize_max(&self) -> i64

Source

#### fn truncate_to_target_usize(&self, val: u64) -> u64

Source

#### fn sign_extend_to_target_isize(&self, val: u64) -> i64

## Implementors§

Source§

### impl<T: HasDataLayout> PointerArithmetic for T