# PixelBuffer

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-apple/struct-pixelbuffer/

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

```rust
struct PixelBuffer
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Apple/native.rs#L14)

## Members

- [`as_raw`](#function-as_raw)
- [`from_owned`](#function-from_owned)
- [`info`](#function-info)
- [`surface`](#function-surface)

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

### as_raw

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

Borrowed CoreVideo handle, valid only while this buffer remains leased.
Native clients must retain it for asynchronous use and never mutate it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Apple/native.rs#L22)

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

### from_owned

```rust
unsafe fn from_owned(handle: *mut c_void) -> Option<Self>
```

Adopts an immutable CoreVideo reference from a native producer.
## Safety
The non-null pointer must be a valid +1 CVPixelBuffer reference. Its
producer must not mutate/reuse pixels while any owner or lease exists.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Apple/native.rs#L30)

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

### info

```rust
fn info(self: &Self) -> (u32, u32, u64, u64, i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Apple/native.rs#L33)

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

### surface

```rust
fn surface(self: &Self) -> Option<usize>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Apple/native.rs#L47)

## Trait implementations

- `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`
- `Send`
- `Sync`
- `Drop`

## Availability

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