# PageContext

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/cache/struct-pagecontext/

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

```rust
struct PageContext<T>
```

The page of a change set of `SortAndPage`, with the comparer and the options
(`record PageContext<TObject>`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L12)

## Members

- [`response`](#struct_field-response)
- [`comparer`](#struct_field-comparer)
- [`options`](#struct_field-options)
- [`new`](#function-new)
- [`empty`](#function-empty)

<a id="struct_field-response"></a>

### response

```rust
response: super::PageResponse
```

The page (`Response`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L14)

<a id="struct_field-comparer"></a>

### comparer

```rust
comparer: std::rc::Rc<dyn Fn(&T, &T) -> std::cmp::Ordering>
```

The comparer of the sort (`Comparer`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L16)

<a id="struct_field-options"></a>

### options

```rust
options: super::SortAndPageOptions
```

The options (`Options`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L18)

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

### new

```rust
fn new(response: PageResponse, comparer: Rc<dyn Fn(&T, &T) -> Ordering>, options: SortAndPageOptions) -> Self
```

A context of its parts.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L23)

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

### empty

```rust
fn empty() -> Self
where T: 'static
```

The context before any page (`PageContext<TObject>.Empty`).

Deviation (DEVIATIONS.md, DynamicData): its comparer finds every pair equal, as there is no
`Comparer<TObject>.Default` for every item.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/cache/page_context.rs#L31)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `Clone`
- `PartialEq`
- `Debug`

## Availability

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