# Rect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-tools/struct-rect/

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

```rust
struct Rect
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L23)

## Members

- [`x`](#struct_field-x)
- [`y`](#struct_field-y)
- [`width`](#struct_field-width)
- [`height`](#struct_field-height)
- [`new`](#function-new)
- [`right`](#function-right)
- [`bottom`](#function-bottom)
- [`center`](#function-center)
- [`validate`](#function-validate)
- [`contains`](#function-contains)
- [`intersects`](#function-intersects)
- [`union`](#function-union)
- [`translated`](#function-translated)

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

### x

```rust
x: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L24)

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

### y

```rust
y: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L25)

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

### width

```rust
width: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L26)

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

### height

```rust
height: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L27)

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

### new

```rust
fn new(x: f64, y: f64, width: f64, height: f64) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L30)

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

### right

```rust
fn right(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L38)

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

### bottom

```rust
fn bottom(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L41)

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

### center

```rust
fn center(self: Self) -> Point
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L44)

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

### validate

```rust
fn validate(self: Self) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L50)

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

### contains

```rust
fn contains(self: Self, p: Point) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L67)

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

### intersects

```rust
fn intersects(self: Self, other: Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L70)

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

### union

```rust
fn union(self: Self, other: Self) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L76)

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

### translated

```rust
fn translated(self: Self, delta: Point) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L86)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `DeserializeOwned`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Serialize`
- `Deserialize<'de>`

## Availability

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