FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    host

    fn host(session: &Rc<RefCell<DesignerSession>>, options: SharingOptions) -> Result<Rc<Self>, String>
    

    Source

    join

    fn join(session: &Rc<RefCell<DesignerSession>>, invitation: String, options: SharingOptions) -> Result<Rc<Self>, String>
    

    Source

    resume

    fn resume(session: &Rc<RefCell<DesignerSession>>, options: SharingOptions) -> Result<Rc<Self>, String>
    

    Source

    status

    fn status(self: &Self) -> SharingStatus
    

    Source

    set_cursor

    fn set_cursor(self: &Self, cursor: Option<Cursor>) -> Result<(), String>
    

    Cursor coordinates are artboard-local logical units, independent of viewport zoom/scroll.

    Source

    pending_source

    fn pending_source(self: &Self) -> Option<String>
    

    Source

    pending_local_source

    fn pending_local_source(self: &Self) -> Option<String>
    

    The saved offline draft offered as a resolution when resuming after a restart.

    Source

    invite

    fn invite(self: &Self, role: Role) -> Result<(), String>
    

    Source

    set_member

    fn set_member(self: &Self, actor: String, role: Role, revoked: bool) -> Result<(), String>
    

    Source

    checkpoint

    fn checkpoint(self: &Self) -> Result<(), String>
    

    Source

    refresh_room

    fn refresh_room(self: &Self) -> Result<(), String>
    

    Source

    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.

    Source

    disconnect

    fn disconnect(self: &Self)
    

    Source

    poll

    fn poll(self: &Self) -> Result<bool, String>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Same
    • Drop

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.