# Handle

<a id="handle-6"></a>

# Handle

```cpp
#include <icy/handle.h>

template<typename T>
class Handle
```

[Defined in src/base/include/icy/handle.h:133](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L133)

> **Subclassed by:** [`Stream< uv_pipe_t >`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#stream), [`Stream< uv_tcp_t >`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#stream), [`Stream< T >`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#stream)

Wrapper class for managing `uv_handle_t` variants.

This class manages the handle during its lifecycle and safely handles the asynchronous destruction mechanism.

## Public Methods

| Return | Name | Description |
|--------|------|-------------|
|  | [`Handle`](#handle-7) `inline` | Construct the handle bound to the given event loop. |
|  | [`~Handle`](#handle-8) `virtual` `inline` |  |
| `bool` | [`init`](#init-8) `inline` | Initialize the underlying libuv handle by calling `f` with the loop, the raw handle pointer, and any additional `args`. |
| `bool` | [`invoke`](#invoke) `inline` | Invoke a libuv function `f` with `args` on the initialized handle. |
| `void` | [`invokeOrThrow`](#invokeorthrow) `inline` | Invoke a libuv function `f` with `args`, throwing on failure. |
| `void` | [`close`](#close-18) `virtual` `inline` | Close and destroy the handle. |
| `void` | [`ref`](#ref) `inline` | Re-reference the handle with the event loop after a previous [`unref()`](#unref). |
| `void` | [`unref`](#unref) `inline` | Unreference the handle from the event loop. |
| `bool` | [`initialized`](#initialized-1) `const` `inline` | Return `true` if the handle has been successfully initialized via [`init()`](#init-8). |
| `bool` | [`active`](#active-3) `virtual` `const` `inline` | Return `true` when the handle is active (libuv `uv_is_active`). |
| `bool` | [`closing`](#closing-1) `virtual` `const` `inline` | Return `true` if `uv_close` has been called and the handle is awaiting its close callback (libuv `uv_is_closing`). |
| `bool` | [`closed`](#closed-2) `virtual` `const` `inline` | Return `true` if the handle has been fully closed (context released). |
| const [`icy::Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) & | [`error`](#error-11) `const` `inline` | Return the last error set on this handle, or a default-constructed [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) if no error has occurred. |
| `void` | [`setError`](#seterror-1) `virtual` `inline` | Set the error state and invoke [`onError()`](#onerror). |
| `void` | [`setUVError`](#setuverror) `inline` | Translate a libuv error code into an [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) and call [`setError()`](#seterror-1). |
| `void` | [`setAndThrowError`](#setandthrowerror) `inline` | Set the error state from a libuv error code and throw a `std::runtime_error`. |
| `void` | [`throwLastError`](#throwlasterror) `inline` | Throw a `std::runtime_error` if the handle currently holds an error. |
| [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) * | [`loop`](#loop-3) `const` `inline` | Return the event loop this handle is bound to. |
| `void` | [`reset`](#reset-12) `inline` | Close the current handle (if open) and allocate a fresh [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2), leaving the handle ready to be re-initialized via [`init()`](#init-8). |
| [`Handle`](#handle-6) * | [`get`](#get-15) `const` `inline` | Return the raw libuv handle pointer cast to [`Handle`](#handle-6). |
| `std::thread::id` | [`tid`](#tid-2) `const` `inline` | Return the ID of the thread that constructed this handle. |
| [`IntrusivePtr`](https://auscaster.com/icey/docs/api-reference/icy-IntrusivePtr.md#intrusiveptr)< [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2)< T > > | [`context`](#context-5) `const` `inline` | Return the raw [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2) that owns the libuv handle memory. |
| `T *` | [`rawPtr`](#rawptr) `const` `inline` | Return the raw libuv handle pointer without retaining the [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2). |
| `void` | [`setCloseCleanup`](#setclosecleanup) `inline` |  |
| `void` | [`clearCloseCleanup`](#clearclosecleanup) `inline` |  |
| `void` | [`assertThread`](#assertthread) `const` `inline` | Throw `std::logic_error` if called from any thread other than the thread that constructed this handle. |

---

<a id="handle-7"></a>

### Handle

`inline`

```cpp
inline Handle(uv::Loop * loop = uv::defaultLoop())
```

[Defined in src/base/include/icy/handle.h:140](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L140)

Construct the handle bound to the given event loop.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `loop` | [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) * | Event loop to associate this handle with. Defaults to the process-wide default loop. |

---

<a id="handle-8"></a>

### ~Handle

`virtual` `inline`

```cpp
virtual inline ~Handle()
```

[Defined in src/base/include/icy/handle.h:146](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L146)

---

<a id="init-8"></a>

### init

`inline`

```cpp
template<typename F, typename... Args> inline bool init(F && f, Args &&... args)
```

[Defined in src/base/include/icy/handle.h:161](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L161)

Initialize the underlying libuv handle by calling `f` with the loop, the raw handle pointer, and any additional `args`.

Must be called exactly once before any other operations. Throws `std::logic_error` if the handle is already initialized or the context is invalid.

#### Returns
`true` on success; `false` and sets the error state on failure.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `f` | `F &&` | libuv init function (e.g. `uv_tcp_init`). |
| `args` | `Args &&...` | Additional arguments forwarded after the loop and handle pointer. |

---

<a id="invoke"></a>

### invoke

`inline`

```cpp
template<typename F, typename... Args> inline bool invoke(F && f, Args &&... args)
```

[Defined in src/base/include/icy/handle.h:183](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L183)

Invoke a libuv function `f` with `args` on the initialized handle.

Throws `std::logic_error` if the handle is not yet initialized. Sets the error state and returns `false` if `f` returns a libuv error code.

#### Returns
`true` on success; `false` on libuv error.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `f` | `F &&` | libuv function to call. |
| `args` | `Args &&...` | Arguments forwarded to `f`. |

---

<a id="invokeorthrow"></a>

### invokeOrThrow

`inline`

```cpp
template<typename F, typename... Args> inline void invokeOrThrow(const std::string & message, F && f, Args &&... args)
```

[Defined in src/base/include/icy/handle.h:204](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L204)

Invoke a libuv function `f` with `args`, throwing on failure.

Identical to [`invoke()`](#invoke) but throws a `std::runtime_error` with `message` prepended if `f` returns a libuv error code. Must not be called from inside a libuv callback.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `message` | `const std::string &` | [Error](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) message prefix used in the thrown exception. |
| `f` | `F &&` | libuv function to call. |
| `args` | `Args &&...` | Arguments forwarded to `f`. |

---

<a id="close-18"></a>

### close

`virtual` `inline`

```cpp
virtual inline void close()
```

[Defined in src/base/include/icy/handle.h:218](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L218)

Close and destroy the handle.

Releases the [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2) (which schedules the async `uv_close`) and then fires [`onClose()`](#onclose). Safe to call more than once; subsequent calls are no-ops.

#### Reimplemented by

- [`Stream::close`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#close-5)
- [`Stream::close`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#close-5)
- [`Stream::close`](https://auscaster.com/icey/docs/api-reference/icy-Stream.md#close-5)
- [`SSLSocket::close`](https://auscaster.com/icey/docs/api-reference/icy-net-SSLSocket.md#close-21)
- [`TCPSocket::close`](https://auscaster.com/icey/docs/api-reference/icy-net-TCPSocket.md#close-22)
- [`UDPSocket::close`](https://auscaster.com/icey/docs/api-reference/icy-net-UDPSocket.md#close-23)

---

<a id="ref"></a>

### ref

`inline`

```cpp
inline void ref()
```

[Defined in src/base/include/icy/handle.h:235](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L235)

Re-reference the handle with the event loop after a previous [`unref()`](#unref).

When all handles are unref'd the loop exits automatically. This call reverses that. Has no effect if the handle is not initialized.

---

<a id="unref"></a>

### unref

`inline`

```cpp
inline void unref()
```

[Defined in src/base/include/icy/handle.h:245](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L245)

Unreference the handle from the event loop.

The loop will exit when all active handles are unref'd, even if this handle is still alive. Has no effect if the handle is not initialized.

---

<a id="initialized-1"></a>

### initialized

`const` `inline`

```cpp
inline bool initialized() const
```

[Defined in src/base/include/icy/handle.h:252](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L252)

Return `true` if the handle has been successfully initialized via [`init()`](#init-8).

---

<a id="active-3"></a>

### active

`virtual` `const` `inline`

```cpp
virtual inline bool active() const
```

[Defined in src/base/include/icy/handle.h:261](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L261)

Return `true` when the handle is active (libuv `uv_is_active`).

"Active" has type-specific meaning: a timer is active while counting, a stream is active while connected, etc.

---

<a id="closing-1"></a>

### closing

`virtual` `const` `inline`

```cpp
virtual inline bool closing() const
```

[Defined in src/base/include/icy/handle.h:268](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L268)

Return `true` if `uv_close` has been called and the handle is awaiting its close callback (libuv `uv_is_closing`).

---

<a id="closed-2"></a>

### closed

`virtual` `const` `inline`

```cpp
virtual inline bool closed() const
```

[Defined in src/base/include/icy/handle.h:274](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L274)

Return `true` if the handle has been fully closed (context released).

#### Reimplemented by

- [`TCPSocket::closed`](https://auscaster.com/icey/docs/api-reference/icy-net-TCPSocket.md#closed-4)
- [`UDPSocket::closed`](https://auscaster.com/icey/docs/api-reference/icy-net-UDPSocket.md#closed-5)

---

<a id="error-11"></a>

### error

`const` `inline`

```cpp
inline const icy::Error & error() const
```

[Defined in src/base/include/icy/handle.h:281](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L281)

Return the last error set on this handle, or a default-constructed [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) if no error has occurred.

---

<a id="seterror-1"></a>

### setError

`virtual` `inline`

```cpp
virtual inline void setError(const Error & error)
```

[Defined in src/base/include/icy/handle.h:289](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L289)

Set the error state and invoke [`onError()`](#onerror).

#### Reimplemented by

- [`TCPSocket::setError`](https://auscaster.com/icey/docs/api-reference/icy-net-TCPSocket.md#seterror-3)
- [`UDPSocket::setError`](https://auscaster.com/icey/docs/api-reference/icy-net-UDPSocket.md#seterror-4)

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `error` | const [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) & | [Error](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) value to store and propagate. |

---

<a id="setuverror"></a>

### setUVError

`inline`

```cpp
inline void setUVError(int err, std::string prefix = "UV Error")
```

[Defined in src/base/include/icy/handle.h:303](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L303)

Translate a libuv error code into an [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) and call [`setError()`](#seterror-1).

Safe to call from inside libuv callbacks.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `err` | `int` | libuv error code (negative integer). |
| `prefix` | `std::string` | Human-readable prefix prepended to the formatted message. |

---

<a id="setandthrowerror"></a>

### setAndThrowError

`inline`

```cpp
inline void setAndThrowError(int err, std::string prefix = "UV Error")
```

[Defined in src/base/include/icy/handle.h:317](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L317)

Set the error state from a libuv error code and throw a `std::runtime_error`.

Must not be called from inside libuv callbacks; use [`setUVError()`](#setuverror) there.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `err` | `int` | libuv error code (negative integer). |
| `prefix` | `std::string` | Human-readable prefix prepended to the thrown message. |

---

<a id="throwlasterror"></a>

### throwLastError

`inline`

```cpp
inline void throwLastError(std::string prefix = "UV Error")
```

[Defined in src/base/include/icy/handle.h:329](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L329)

Throw a `std::runtime_error` if the handle currently holds an error.

The stored error's message is re-formatted with `prefix` before throwing. No-op if the handle is not in an error state.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `prefix` | `std::string` | Human-readable prefix used when re-formatting the message. |

---

<a id="loop-3"></a>

### loop

`const` `inline`

```cpp
inline uv::Loop * loop() const
```

[Defined in src/base/include/icy/handle.h:340](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L340)

Return the event loop this handle is bound to.

Asserts that the caller is on the owning thread.

#### Returns
Pointer to the associated [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1).

---

<a id="reset-12"></a>

### reset

`inline`

```cpp
inline void reset()
```

[Defined in src/base/include/icy/handle.h:348](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L348)

Close the current handle (if open) and allocate a fresh [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2), leaving the handle ready to be re-initialized via [`init()`](#init-8).

---

<a id="get-15"></a>

### get

`const` `inline`

```cpp
template<typename Handle = T> inline Handle * get() const
```

[Defined in src/base/include/icy/handle.h:363](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L363)

Return the raw libuv handle pointer cast to [`Handle`](#handle-6).

Returns `nullptr` if the context has been released (handle closed). Asserts that the caller is on the owning thread.

#### Returns
Pointer to the underlying libuv handle, or `nullptr`.

---

<a id="tid-2"></a>

### tid

`const` `inline`

```cpp
inline std::thread::id tid() const
```

[Defined in src/base/include/icy/handle.h:374](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L374)

Return the ID of the thread that constructed this handle.

All handle operations must be performed on this thread.

#### Returns
`std::thread::id` of the owning thread.

---

<a id="context-5"></a>

### context

`const` `inline`

```cpp
inline IntrusivePtr< Context< T > > context() const
```

[Defined in src/base/include/icy/handle.h:385](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L385)

Return the raw [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2) that owns the libuv handle memory.

Primarily for use by subclasses and libuv callbacks that need to access the underlying libuv handle memory.

#### Returns
A retained reference to the [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2), or an empty reference if closed.

---

<a id="rawptr"></a>

### rawPtr

`const` `inline`

```cpp
inline T * rawPtr() const
```

[Defined in src/base/include/icy/handle.h:398](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L398)

Return the raw libuv handle pointer without retaining the [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2).

The intrusive refcount is non-atomic and owned by the loop thread, so cross-thread callers (e.g. [`Synchronizer::post()`](https://auscaster.com/icey/docs/api-reference/icy-Synchronizer.md#post)) must use this accessor with external synchronization against [`close()`](#close-18) rather than copying the context.

#### Returns
Pointer to the underlying libuv handle, or `nullptr` if closed.

---

<a id="setclosecleanup"></a>

### setCloseCleanup

`inline`

```cpp
template<typename U> inline void setCloseCleanup(U * data)
```

[Defined in src/base/include/icy/handle.h:404](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L404)

---

<a id="clearclosecleanup"></a>

### clearCloseCleanup

`inline`

```cpp
inline void clearCloseCleanup()
```

[Defined in src/base/include/icy/handle.h:413](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L413)

---

<a id="assertthread"></a>

### assertThread

`const` `inline`

```cpp
inline void assertThread() const
```

[Defined in src/base/include/icy/handle.h:421](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L421)

Throw `std::logic_error` if called from any thread other than the thread that constructed this handle.

## Protected Attributes

| Return | Name | Description |
|--------|------|-------------|
| [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) * | [`_loop`](#_loop)  |  |
| [`IntrusivePtr`](https://auscaster.com/icey/docs/api-reference/icy-IntrusivePtr.md#intrusiveptr)< [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2)< T > > | [`_context`](#_context-1)  |  |
| `std::thread::id` | [`_tid`](#_tid)  |  |
| [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) | [`_error`](#_error-3)  |  |

---

<a id="_loop"></a>

### _loop

```cpp
uv::Loop * _loop
```

Type: [`uv::Loop`](https://auscaster.com/icey/docs/api-reference/uv.md#loop-1) *

[Defined in src/base/include/icy/handle.h:456](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L456)

---

<a id="_context-1"></a>

### _context

```cpp
IntrusivePtr< Context< T > > _context
```

Type: [`IntrusivePtr`](https://auscaster.com/icey/docs/api-reference/icy-IntrusivePtr.md#intrusiveptr)< [`Context`](https://auscaster.com/icey/docs/api-reference/icy-uv-Context.md#context-2)< T > >

[Defined in src/base/include/icy/handle.h:457](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L457)

---

<a id="_tid"></a>

### _tid

```cpp
std::thread::id _tid = std::this_thread::get_id()
```

[Defined in src/base/include/icy/handle.h:458](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L458)

---

<a id="_error-3"></a>

### _error

```cpp
Error _error
```

Type: [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error)

[Defined in src/base/include/icy/handle.h:459](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L459)

## Protected Methods

| Return | Name | Description |
|--------|------|-------------|
| `void` | [`onError`](#onerror) `virtual` `inline` | Called by [`setError()`](#seterror-1) after the error state has been updated. |
| `void` | [`onClose`](#onclose) `virtual` `inline` | Called by [`close()`](#close-18) after the context has been released. |
|  | [`Handle`](#handle-9)  | NonCopyable and NonMovable. |
| [`Handle`](#handle-6) & | [`operator=`](#operator-171)  | Deleted assignment operator. |
|  | [`Handle`](#handle-10)  | Deleted constructor. |
| [`Handle`](#handle-6) & | [`operator=`](#operator-172)  | Deleted assignment operator. |

---

<a id="onerror"></a>

### onError

`virtual` `inline`

```cpp
virtual inline void onError(const Error & error)
```

[Defined in src/base/include/icy/handle.h:437](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L437)

Called by [`setError()`](#seterror-1) after the error state has been updated.

Override to react to errors. The default implementation is a no-op.

#### Reimplemented by

- [`TCPSocket::onError`](https://auscaster.com/icey/docs/api-reference/icy-net-TCPSocket.md#onerror-1)
- [`UDPSocket::onError`](https://auscaster.com/icey/docs/api-reference/icy-net-UDPSocket.md#onerror-2)

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `error` | const [`Error`](https://auscaster.com/icey/docs/api-reference/icy-Error.md#error) & | The error that was set. |

---

<a id="onclose"></a>

### onClose

`virtual` `inline`

```cpp
virtual inline void onClose()
```

[Defined in src/base/include/icy/handle.h:445](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L445)

Called by [`close()`](#close-18) after the context has been released.

Override to perform cleanup on handle closure. The default implementation is a no-op.

#### Reimplemented by

- [`TCPSocket::onClose`](https://auscaster.com/icey/docs/api-reference/icy-net-TCPSocket.md#onclose-1)
- [`UDPSocket::onClose`](https://auscaster.com/icey/docs/api-reference/icy-net-UDPSocket.md#onclose-2)

---

<a id="handle-9"></a>

### Handle

```cpp
Handle(const Handle &) = delete
```

[Defined in src/base/include/icy/handle.h:451](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L451)

NonCopyable and NonMovable.

---

<a id="operator-171"></a>

### operator=

```cpp
Handle & operator=(const Handle &) = delete
```

[Defined in src/base/include/icy/handle.h:452](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L452)

Deleted assignment operator.

---

<a id="handle-10"></a>

### Handle

```cpp
Handle(Handle &&) = delete
```

[Defined in src/base/include/icy/handle.h:453](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L453)

Deleted constructor.

---

<a id="operator-172"></a>

### operator=

```cpp
Handle & operator=(Handle &&) = delete
```

[Defined in src/base/include/icy/handle.h:454](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L454)

Deleted assignment operator.

## Public Types

| Name | Description |
|------|-------------|
| [`Type`](#type-10)  | Define the native handle type. |

---

<a id="type-10"></a>

### Type

```cpp
using Type = T
```

[Defined in src/base/include/icy/handle.h:429](https://github.com/auscaster/icey/blob/main/src/base/include/icy/handle.h#L429)

Define the native handle type.
