# MetalRenderContext

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-metal/struct-metalrendercontext/

**struct** · [`ferroui-media-metal`](/docs/0.5.0/api/ferroui-media-metal/) · v0.5.0

```rust
struct MetalRenderContext<'a>
```

Borrowed handles valid only during encode. The client must end its encoders
and must not commit or retain this command buffer. The framework submits it
once, retains all input/output leases and signals actual native completion.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L34)

## Members

- [`device`](#function-device)
- [`command_buffer`](#function-command_buffer)
- [`output_texture`](#function-output_texture)
- [`input_texture`](#function-input_texture)

<a id="function-device"></a>

### device

```rust
fn device(self: &Self) -> *mut c_void
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L43)

<a id="function-command_buffer"></a>

### command_buffer

```rust
fn command_buffer(self: &Self) -> *mut c_void
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L46)

<a id="function-output_texture"></a>

### output_texture

```rust
fn output_texture(self: &Self) -> *mut c_void
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L49)

<a id="function-input_texture"></a>

### input_texture

```rust
fn input_texture(self: &Self, frame: &FrameLease) -> Result<MetalTextureView, MediaError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Metal/lib.rs#L53)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
