ReconnectingPeer
struct · ferroui-designer-collaboration-host · v0.5.0
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.
Members
newwith_transportrestoreset_checkpoint_pathcheckpointdocumentrolepending_operationslast_errorsubmitsyncpollrebase
new
fn new(endpoint: Endpoint, joined: JoinedRoom) -> Result<Self>
with_transport
fn with_transport(endpoint: Endpoint, joined: JoinedRoom, transport: Box<dyn PeerTransport>) -> Result<Self>
restore
fn restore(path: impl AsRef<Path>) -> Result<Self>
set_checkpoint_path
fn set_checkpoint_path(self: &mut Self, path: impl AsRef<Path>) -> Result<()>
checkpoint
fn checkpoint(self: &Self) -> PeerCheckpoint
document
fn document(self: &Self) -> &DocumentReplica
role
fn role(self: &Self) -> Role
pending_operations
fn pending_operations(self: &Self) -> usize
last_error
fn last_error(self: &Self) -> Option<&HostError>
submit
fn submit(self: &mut Self, label: impl Into<String>, edits: Vec<SharedEdit>) -> Result<()>
sync
fn sync(self: &mut Self, presence: Option<Presence>) -> Result<ExchangeReply>
poll
fn poll(self: &mut Self, presence: Option<Presence>) -> Option<Result<ExchangeReply>>
rebase
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnySameClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.