[−][src]Trait rawpointer::PointerExt
Extension methods for raw pointers
Required methods
unsafe fn offset(self, i: isize) -> Self
Provided methods
unsafe fn pre_inc(&mut self) -> Self
Increment the pointer by 1, and return its new value.
Equivalent to the C idiom ++ptr
.
unsafe fn post_inc(&mut self) -> Self
Increment the pointer by 1, but return its old value.
Equivalent to the C idiom ptr++
.
unsafe fn pre_dec(&mut self) -> Self
Decrement the pointer by 1, and return its new value.
Equivalent to the C idiom --ptr
.
unsafe fn post_dec(&mut self) -> Self
Decrement the pointer by 1, but return its old value.
Equivalent to the C idiom ptr--
.
unsafe fn inc(&mut self)
Increment by 1
unsafe fn dec(&mut self)
Decrement by 1
unsafe fn stride_offset(self, s: isize, index: usize) -> Self
Offset the pointer by s
multiplied by index
.