Constructors

Link copied to clipboard
constructor(bytes: ByteArray?, defaultIdentities: List<DefaultIdentity>?, callback: ContainersCallback)

Seeds the store from a stored document, or from the default identities when bytes is None. If a migration ran, the document is persisted before this returns.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun create(name: String, icon: ContainerIcon, color: ContainerColor): Container
Link copied to clipboard
open override fun createForPolicy(policyId: String): Container
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun getSiteAssociation(site: String): UInt

The container bound to site, or 0 when there is none.

Link copied to clipboard
open override fun getSiteAssociations(userContextId: UInt?): List<SiteAssociation>
Link copied to clipboard
open override fun moveContainers(userContextIds: List<UInt>, position: Long): Boolean

Moves the given public containers before position, or to the end when it is -1. Positions below -1 are rejected.

Link copied to clipboard
open override fun policyIdentities(): List<Container>
Link copied to clipboard
open override fun policyIdentity(policyId: String): Container?
Link copied to clipboard
open override fun privateIdentity(name: String): Container?
Link copied to clipboard
open override fun privateUserContextIds(): List<UInt>
Link copied to clipboard
open override fun publicIdentities(): List<Container>
Link copied to clipboard
open override fun publicIdentityFromId(userContextId: UInt): Container?
Link copied to clipboard
open override fun publicUserContextIds(): List<UInt>
Link copied to clipboard
open override fun remove(userContextId: UInt): Container?

Removes a public container. Clearing the data stored under its origin attributes is the embedder's job.

Link copied to clipboard
open override fun removePolicyIdentity(userContextId: UInt): Container?
Link copied to clipboard
open override fun removeSiteAssociation(site: String)
Link copied to clipboard
open override fun serialize(): ByteArray

The document as it stands, for the embedder to write.

Link copied to clipboard
open override fun setSiteAssociation(site: String, userContextId: UInt)
Link copied to clipboard
open override fun unsetCallback()

Drops the callback, so that a late mutation during teardown cannot reach an embedder that is already gone.

Link copied to clipboard
open override fun update(userContextId: UInt, name: String, icon: ContainerIcon, color: ContainerColor): Container?

Properties

Link copied to clipboard

Whether the current object has been destroyed and its reference is gone in the Rust side.