Trait rawpointer::PointerExt[][src]

pub trait PointerExt: Copy {
    unsafe fn offset(self, i: isize) -> Self;

    unsafe fn pre_inc(&mut self) -> Self { ... }
unsafe fn post_inc(&mut self) -> Self { ... }
unsafe fn pre_dec(&mut self) -> Self { ... }
unsafe fn post_dec(&mut self) -> Self { ... }
unsafe fn inc(&mut self) { ... }
unsafe fn dec(&mut self) { ... }
unsafe fn stride_offset(self, s: isize, index: usize) -> Self { ... } }
Expand description

Extension methods for raw pointers

Required methods

Provided methods

Increment the pointer by 1, and return its new value.

Equivalent to the C idiom ++ptr.

Increment the pointer by 1, but return its old value.

Equivalent to the C idiom ptr++.

Decrement the pointer by 1, and return its new value.

Equivalent to the C idiom --ptr.

Decrement the pointer by 1, but return its old value.

Equivalent to the C idiom ptr--.

Increment by 1

Decrement by 1

Offset the pointer by s multiplied by index.

Implementors