FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RoomStore

    struct · ferroui-designer-collaboration-host · v0.5.0

    struct RoomStore
    

    One process owns each storage directory (OS file lock). Clones should share an Arc<RoomStore>. The mutex covers validation through durable commit, so authenticated concurrent calls cannot acknowledge a lost update or race a role change. Presence uses the receiver's monotonic clock.

    View source

    Members

    open

    fn open(path: impl AsRef<Path>, admin: &Secret) -> Result<Self>
    

    Source

    authorize

    fn authorize(self: &Self, credentials: &Credentials) -> Result<Role>
    

    Source

    authorize_admin

    fn authorize_admin(self: &Self, admin: &Secret) -> Result<()>
    

    Source

    authorize_scope

    fn authorize_scope(self: &Self, authority: &Authority) -> Result<()>
    

    Source

    create

    fn create(self: &Self, request: CreateRequest) -> Result<JoinedRoom>
    

    owner_token is generated by the caller and is the idempotency key. Retrying a lost response cannot create another room or replace an existing document.

    Source

    create_checked

    fn create_checked(self: &Self, request: CreateRequest, fence: &dyn CommitFence) -> Result<JoinedRoom>
    

    Source

    state

    fn state(self: &Self, credentials: &Credentials) -> Result<RoomState>
    

    Source

    invite

    fn invite(self: &Self, credentials: &Credentials, token: Secret, role: Role, expires_in: u64, uses: u32) -> Result<()>
    

    Source

    invite_checked

    fn invite_checked(self: &Self, credentials: &Credentials, token: Secret, role: Role, expires_in: u64, uses: u32, fence: &dyn CommitFence) -> Result<()>
    

    Source

    join

    fn join(self: &Self, request: JoinRequest) -> Result<JoinedRoom>
    

    Source

    join_checked

    fn join_checked(self: &Self, request: JoinRequest, fence: &dyn CommitFence) -> Result<JoinedRoom>
    

    Source

    set_member

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

    Source

    set_member_checked

    fn set_member_checked(self: &Self, owner: &Credentials, actor: &str, role: Role, revoked: bool, fence: &dyn CommitFence) -> Result<()>
    

    Source

    exchange

    fn exchange(self: &Self, credentials: &Credentials, exchange: Exchange) -> Result<ExchangeReply>
    

    Source

    exchange_checked

    fn exchange_checked(self: &Self, credentials: &Credentials, exchange: Exchange, fence: &dyn CommitFence) -> Result<ExchangeReply>
    

    Source

    checkpoint

    fn checkpoint(self: &Self, owner: &Credentials, epoch: u64, expected: &VersionVector) -> Result<RoomState>
    

    An owner checkpoints only an exact observed vector. Old clients receive EpochChanged; their offline edits remain intact until they explicitly rebase/discard them.

    Source

    checkpoint_checked

    fn checkpoint_checked(self: &Self, owner: &Credentials, epoch: u64, expected: &VersionVector, fence: &dyn CommitFence) -> Result<RoomState>
    

    Source

    checkpoint_resolved

    fn checkpoint_resolved(self: &Self, owner: &Credentials, epoch: u64, expected: &VersionVector, source: &str) -> Result<RoomState>
    

    Adopt an explicitly reviewed source at an exact room version. Historical losing operations remain in the old peer checkpoint until each participant reviews the new epoch.

    Source

    checkpoint_resolved_checked

    fn checkpoint_resolved_checked(self: &Self, owner: &Credentials, epoch: u64, expected: &VersionVector, resolved_source: Option<&str>, fence: &dyn CommitFence) -> Result<RoomState>
    

    Source

    Trait implementations

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

    Availability

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