# fidl::InterfacePtr

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1ae5113d8d2965938b7c53c79307762ce7()` ||
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1ab6fc5736b0bf4ad9e7f960384fee50b5(std::nullptr_t)` ||
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a1c8aec1f354e29db5d62d69831f28b58(const https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr & other)` ||
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1ad1ad044bc6a7362ea7ecd7579b2b1463(https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr && other)` ||

| ### Public types ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1ad4227603039eb766f091f64082aba866` | using `typename Interface::Proxy_` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1aa382642702047b408543496b71bdd0a1(https://fuchsia.dev/reference/cpp/class/zx/channel#classzx_1_1channel channel, async_dispatcher_t *dispatcher)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1ad367549cff38beb491502c7898cc6948(https://fuchsia.dev/reference/cpp/class/fidl/interface-handle#classfidl_1_1_interface_handle< Interface > handle, async_dispatcher_t *dispatcher)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a9041d07a02a5e2a85709056f28c33f1b(async_dispatcher_t *dispatcher)` | `https://fuchsia.dev/reference/cpp/class/fidl/interface-request#classfidl_1_1_interface_request< Interface >` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1acec72fc7dd39f338d02e102e661e4a13()` | `https://fuchsia.dev/reference/cpp/class/fidl/interface-handle#classfidl_1_1_interface_handle< Interface >` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a5b231064439167b65d1ae4e2098fb7a2() const ` | `const https://fuchsia.dev/reference/cpp/class/zx/channel#classzx_1_1channel &` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a8185e8bdce241714a5aa2ad135e4de4f() const ` | `async_dispatcher_t *` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a51c80aaaeeb5ee80860c472163c64fc5() const ` | `Proxy &` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a3e7d4f289b03099f146a647f1e2c4cf9() const ` | `Interface *` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1aa9733108c2be7498eb52889d1690411e() const ` | `bool` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a3ef8149718cf2291ef4523ff367edabe() const ` | ` `` ` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1abd3d7a45cb0eb0b594d517d0d7abd61b() const ` | `Interface &` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a294276960f2b0a5877a20e2a5e7ee9a6() const ` | `Interface *` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a2df3773d2b2ed2c3344ebef3d5da58a4(const https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr & other)=delete` | `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr &` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a0060a9863164251f24e4e1b8af92f8e7(https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr && other)` | `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr &` |
| `https://fuchsia.dev/reference/cpp/class/fidl/interface-ptr#classfidl_1_1_interface_ptr_1a8f6e0e428c8b190fe2cb62d404af8974(https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl< void(zx_status_t)> error_handler)` | `void` |

| ### Structs ||
|---|---|
| [fidl::InterfacePtr::Impl](https://fuchsia.dev/reference/cpp/struct/fidl/interface-ptr/impl) |   |

## Public types

### Proxy

```c++
typename Interface::Proxy_ Proxy
```

## Public functions

### Bind

```c++
zx_status_t Bind(
  zx::channel channel,
  async_dispatcher_t *dispatcher
)
```

### Bind

```c++
zx_status_t Bind(
  InterfaceHandle< Interface > handle,
  async_dispatcher_t *dispatcher
)
```

### InterfacePtr

```c++
 InterfacePtr()
```

### InterfacePtr

```c++
 InterfacePtr(
  std::nullptr_t
)
```

### InterfacePtr

```c++
 InterfacePtr(
  const InterfacePtr & other
)=delete
```

### InterfacePtr

```c++
 InterfacePtr(
  InterfacePtr && other
)
```

### NewRequest

```c++
InterfaceRequest< Interface > NewRequest(
  async_dispatcher_t *dispatcher
)
```

### Unbind

```c++
InterfaceHandle< Interface > Unbind()
```

### channel

```c++
const zx::channel & channel() const 
```

### dispatcher

```c++
async_dispatcher_t * dispatcher() const 
```

### events

```c++
Proxy & events() const 
```

### get

```c++
Interface * get() const 
```

### is_bound

```c++
bool is_bound() const 
```

### operator bool

```c++
 operator bool() const 
```

### operator\*

```c++
Interface & operator*() const 
```

### operator-\>

```c++
Interface * operator->() const 
```

### operator=

```c++
InterfacePtr & operator=(
  const InterfacePtr & other
)=delete
```

### operator=

```c++
InterfacePtr & operator=(
  InterfacePtr && other
)
```

### set_error_handler

```c++
void set_error_handler(
  fit::function< void(zx_status_t)> error_handler
)
```