SharingController
struct · ferroui-designer · v0.5.0
struct SharingController
Retain this controller while sharing. Call poll on the UI thread (the stock workspace does
so from its existing timer). A document/tab change detaches the old room before any reply is
applied. All operations are revision-checked and leave source drafts intact on failure.
Members
hostjoinresumestatusset_cursorpending_sourcepending_local_sourceinviteset_membercheckpointrefresh_roomaccept_snapshotdisconnectpoll
host
fn host(session: &Rc<RefCell<DesignerSession>>, options: SharingOptions) -> Result<Rc<Self>, String>
join
fn join(session: &Rc<RefCell<DesignerSession>>, invitation: String, options: SharingOptions) -> Result<Rc<Self>, String>
resume
fn resume(session: &Rc<RefCell<DesignerSession>>, options: SharingOptions) -> Result<Rc<Self>, String>
status
fn status(self: &Self) -> SharingStatus
set_cursor
fn set_cursor(self: &Self, cursor: Option<Cursor>) -> Result<(), String>
Cursor coordinates are artboard-local logical units, independent of viewport zoom/scroll.
pending_source
fn pending_source(self: &Self) -> Option<String>
pending_local_source
fn pending_local_source(self: &Self) -> Option<String>
The saved offline draft offered as a resolution when resuming after a restart.
invite
fn invite(self: &Self, role: Role) -> Result<(), String>
set_member
fn set_member(self: &Self, actor: String, role: Role, revoked: bool) -> Result<(), String>
checkpoint
fn checkpoint(self: &Self) -> Result<(), String>
refresh_room
fn refresh_room(self: &Self) -> Result<(), String>
accept_snapshot
fn accept_snapshot(self: &Self, expected_revision: u64, resolved_source: Option<String>) -> Result<(), String>
The stock UI presents the exact remote source and a resolution field before this call.
None restores the saved session draft; pass Some(pending_source()) to explicitly adopt
the remote document instead. A revision pin prevents applying that decision if the local
document changes during I/O.
disconnect
fn disconnect(self: &Self)
poll
fn poll(self: &Self) -> Result<bool, String>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherSameDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.