# [−][src]Trait rawpointer::PointerExt

    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 { ... }
    }

Extension methods for raw pointers

## Required methods

### `unsafe fn offset(self, i: isize) -> Self`

Loading content...

## 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`.

Loading content...

## Implementors

### `impl<T> PointerExt for *const T`[src]

#### `unsafe fn offset(self, i: isize) -> Self`[src]

### `impl<T> PointerExt for *mut T`[src]

#### `unsafe fn offset(self, i: isize) -> Self`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)