# ReconnectingPeer

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-collaboration-host/struct-reconnectingpeer/

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

```rust
struct ReconnectingPeer
```

A durable offline outbox is derived from the operation set and the last acknowledged server
vector. Repeating an exchange after a dropped response is safe and never deletes local work.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L274)

## Members

- [`new`](#function-new)
- [`with_transport`](#function-with_transport)
- [`restore`](#function-restore)
- [`set_checkpoint_path`](#function-set_checkpoint_path)
- [`checkpoint`](#function-checkpoint)
- [`document`](#function-document)
- [`role`](#function-role)
- [`pending_operations`](#function-pending_operations)
- [`last_error`](#function-last_error)
- [`submit`](#function-submit)
- [`sync`](#function-sync)
- [`poll`](#function-poll)
- [`rebase`](#function-rebase)

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

### new

```rust
fn new(endpoint: Endpoint, joined: JoinedRoom) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L289)

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

### with_transport

```rust
fn with_transport(endpoint: Endpoint, joined: JoinedRoom, transport: Box<dyn PeerTransport>) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L293)

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

### restore

```rust
fn restore(path: impl AsRef<Path>) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L318)

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

### set_checkpoint_path

```rust
fn set_checkpoint_path(self: &mut Self, path: impl AsRef<Path>) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L345)

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

### checkpoint

```rust
fn checkpoint(self: &Self) -> PeerCheckpoint
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L354)

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

### document

```rust
fn document(self: &Self) -> &DocumentReplica
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L383)

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

### role

```rust
fn role(self: &Self) -> Role
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L386)

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

### pending_operations

```rust
fn pending_operations(self: &Self) -> usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L389)

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

### last_error

```rust
fn last_error(self: &Self) -> Option<&HostError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L393)

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

### submit

```rust
fn submit(self: &mut Self, label: impl Into<String>, edits: Vec<SharedEdit>) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L396)

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

### sync

```rust
fn sync(self: &mut Self, presence: Option<Presence>) -> Result<ExchangeReply>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L413)

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

### poll

```rust
fn poll(self: &mut Self, presence: Option<Presence>) -> Option<Result<ExchangeReply>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L468)

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

### rebase

```rust
fn rebase(self: &mut Self, state: RoomState, expected_remote: &str, resolved: &str) -> Result<()>
```

An explicit CAS rebase onto a new epoch. The caller supplies the remote source they
reviewed and a resolved source; stale resolutions fail without losing the old outbox.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Collaboration.Host/client.rs#L477)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `Same`
- [`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/).
