platinum_core public native declarations
Open searchable reader
platinum_core::animation
platinum_core::animation
Deterministic scalar animation without scene, UI, game, or rendering bindings.
Hosts resolve typed bindings and own the clock. Sampling has no side effects,
spawning, expressions, notifications, or simulation authority. Results are
deterministic for identical validated data and inputs within the same numeric
environment; cross-platform bitwise replay is not asserted.
Validation bounds already-decoded collections. Hosts must also bound serialized
input/collection allocation before decoding untrusted clips.
Source: crates/platinum-core/src/animation.rs:1
platinum_core::animation::TargetId
pub struct TargetId(pub [u8; 16])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:14
platinum_core::animation::PropertyId
pub struct PropertyId(pub [u8; 16])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:17
platinum_core::animation::ScalarBinding
pub struct ScalarBinding
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| target | TargetId | |
| property | PropertyId | |
Source: crates/platinum-core/src/animation.rs:20
platinum_core::animation::Interpolation
pub enum Interpolation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:26
platinum_core::animation::ScalarKey
pub struct ScalarKey
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| time | f64 | Seconds in the clip's clock, bounded to [0, duration]. |
| value | f64 | |
| interpolation | Interpolation | Interpolation from this key to the next; last key holds its value. |
Source: crates/platinum-core/src/animation.rs:34
platinum_core::animation::ScalarTrack
pub struct ScalarTrack
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| binding | ScalarBinding | |
| keys | Vec<ScalarKey> | |
Source: crates/platinum-core/src/animation.rs:43
platinum_core::animation::BlendMode
pub enum BlendMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:49
platinum_core::animation::ScalarLayer
pub struct ScalarLayer
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| muted | bool | |
| weight | f64 | Finite [0, 1]. Additive tracks represent deltas, not absolute values. |
| blend | BlendMode | |
| tracks | Vec<ScalarTrack> | |
Source: crates/platinum-core/src/animation.rs:55
platinum_core::animation::ScalarClip
pub struct ScalarClip
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| duration | f64 | |
| layers | Vec<ScalarLayer> | Evaluated in authored order; order is semantically significant. |
Source: crates/platinum-core/src/animation.rs:64
platinum_core::animation::AnimationLimits
pub struct AnimationLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_layers | usize | |
| max_tracks | usize | |
| max_keys | usize | |
| max_duration | f64 | |
| max_abs_value | f64 | |
Source: crates/platinum-core/src/animation.rs:71
platinum_core::animation::AnimationError
pub enum AnimationError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:92
platinum_core::animation::ValidatedScalarClip
pub struct ValidatedScalarClip
A validated immutable clip. Deserialization goes through `ScalarClip` followed
by `validate`, so untrusted serialized data cannot bypass invariant checks.
Source: crates/platinum-core/src/animation.rs:110
platinum_core::animation::ScalarClip::validate
pub fn validate(self, limits: AnimationLimits) -> Result<ValidatedScalarClip, AnimationError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:116
platinum_core::animation::ValidatedScalarClip::clip
pub fn clip(&self) -> &ScalarClip
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/animation.rs:178
platinum_core::animation::ValidatedScalarClip::sample
pub fn sample(
&self,
time: f64,
bases: &BTreeMap<ScalarBinding, f64>,
) -> Result<BTreeMap<ScalarBinding, f64>, AnimationError>
Clamp finite time to the clip, holding the first/last keys outside their
authored ranges. Every active binding requires an explicit base value;
no implicit zero is assumed for properties such as scale or gain.
Returns only affected bindings and never changes caller state on failure.
Source: crates/platinum-core/src/animation.rs:186
platinum_core::application_registry
platinum_core::application_registry
Pure inert metadata and CAS planning. No candidate execution, verification,
grant issuance, filesystem access, installation or durable catalog mutation.
Source: crates/platinum-core/src/application_registry.rs:1
platinum_core::application_registry::ApplicationGuid
pub struct ApplicationGuid([u8; 16])
Stable product identity only: not a principal, permission or publisher proof.
Bytes follow textual/network order, not Windows mixed-endian GUID memory.
Assigned nonnil IDs retain all bits; no version/variant policy is imposed.
Source: crates/platinum-core/src/application_registry.rs:15
platinum_core::application_registry::ApplicationGuid::try_from_bytes
pub fn try_from_bytes(bytes: [u8; 16]) -> Result<Self, RegistryError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:17
platinum_core::application_registry::ApplicationGuid::as_bytes
pub fn as_bytes(&self) -> &[u8; 16]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:23
platinum_core::application_registry::ApplicationGuid::parse
pub fn parse(value: &str) -> Result<Self, RegistryError>
Exact dashed36-byte ASCII spelling. Case is accepted and canonicalized
by Display/serde; whitespace/braces/compact forms/nil are rejected.
Source: crates/platinum-core/src/application_registry.rs:28
platinum_core::application_registry::RegistryError
pub enum RegistryError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:109
platinum_core::application_registry::RelativeExecutable
pub struct RelativeExecutable(String)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:125
platinum_core::application_registry::RelativeExecutable::parse
pub fn parse(value: &str) -> Result<Self, RegistryError>
Lexical policy only; cannot prove filesystem containment or file identity.
Source: crates/platinum-core/src/application_registry.rs:128
platinum_core::application_registry::RelativeExecutable::as_str
pub fn as_str(&self) -> &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:165
platinum_core::application_registry::ProtocolVersion
pub struct ProtocolVersion
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| major | u16 | |
| minor | u16 | |
Source: crates/platinum-core/src/application_registry.rs:171
platinum_core::application_registry::ThemeLoading
pub enum ThemeLoading
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:177
platinum_core::application_registry::CandidateMetadata
pub struct CandidateMetadata
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:199
platinum_core::application_registry::CandidateMetadata::application
pub fn application(&self) -> ApplicationGuid
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:208
platinum_core::application_registry::CandidateMetadata::display_name
pub fn display_name(&self) -> &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:211
platinum_core::application_registry::CandidateMetadata::protocol
pub fn protocol(&self) -> ProtocolVersion
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:214
platinum_core::application_registry::CandidateMetadata::executable
pub fn executable(&self) -> &RelativeExecutable
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:217
platinum_core::application_registry::CandidateMetadata::package
pub fn package(&self) -> AssetRef
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:220
platinum_core::application_registry::CandidateMetadata::theme_loading
pub fn theme_loading(&self) -> ThemeLoading
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:223
platinum_core::application_registry::parse_candidate
pub fn parse_candidate(bytes: &[u8]) -> Result<CandidateMetadata, RegistryError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:227
platinum_core::application_registry::CatalogView
pub struct CatalogView
Already authenticated catalog view supplied by trusted host, never a proof
minted by parsing a candidate. This type itself confers no mutation authority.
Public data fields| Name | Type / declaration | Description |
|---|
| application | ApplicationGuid | |
| generation | Generation | |
| package | AssetRef | |
Source: crates/platinum-core/src/application_registry.rs:272
platinum_core::application_registry::RegistrationPlan
pub struct RegistrationPlan
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:278
platinum_core::application_registry::RegistrationPlan::application
pub fn application(&self) -> ApplicationGuid
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:285
platinum_core::application_registry::RegistrationPlan::expected_generation
pub fn expected_generation(&self) -> Option<Generation>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:288
platinum_core::application_registry::RegistrationPlan::next_generation
pub fn next_generation(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:291
platinum_core::application_registry::RegistrationPlan::package
pub fn package(&self) -> AssetRef
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_registry.rs:294
platinum_core::application_registry::plan_registration
pub fn plan_registration(
candidate: &CandidateMetadata,
current: Option<&CatalogView>,
expected: Option<Generation>,
) -> Result<RegistrationPlan, RegistryError>
A plan is a verification request, not an installed/runnable application.
Host must recheck CAS, publisher/install scope, immutable file identity and
grants at durable publication. No verified flag exists in the input/output.
Source: crates/platinum-core/src/application_registry.rs:301
platinum_core::application_registry::preflight_asset_bundle
pub fn preflight_asset_bundle(
staging: &mut AssetRegistry,
bundle: Vec<AssetRevision>,
) -> Result<(), AssetError>
Only a staging registry! Call after host byte verification. This performs
actual SDK metadata/dependency preflight, no hash/publisher/OS validation.
Source: crates/platinum-core/src/application_registry.rs:326
platinum_core::application_release
platinum_core::application_release
Inert exact-byte release contracts. No hashing, signature verification,
publisher authorization, filesystem access or publication occurs here.
Source: crates/platinum-core/src/application_release.rs:1
platinum_core::application_release::RELEASE_MANIFEST_PATH
pub const RELEASE_MANIFEST_PATH: &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:5
platinum_core::application_release::ReleaseError
pub enum ReleaseError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:8
platinum_core::application_release::ReleaseResult
pub type ReleaseResult<T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:19
platinum_core::application_release::BuildId
pub struct BuildId(ApplicationGuid)
A build identity is not a product identity, principal or server revision.
Source: crates/platinum-core/src/application_release.rs:23
platinum_core::application_release::BuildId::parse
pub fn parse(value: &str) -> ReleaseResult<Self>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:25
platinum_core::application_release::BuildId::as_bytes
pub fn as_bytes(&self) -> &[u8; 16]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:30
platinum_core::application_release::Sha256Digest
pub struct Sha256Digest([u8; 32])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:51
platinum_core::application_release::Sha256Digest::from_bytes
pub fn from_bytes(bytes: [u8; 32]) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:53
platinum_core::application_release::Sha256Digest::as_bytes
pub fn as_bytes(&self) -> &[u8; 32]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:56
platinum_core::application_release::Sha256Digest::parse
pub fn parse(value: &str) -> ReleaseResult<Self>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:59
platinum_core::application_release::ReleaseLimits
pub struct ReleaseLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| manifest_bytes | usize | |
| node_bytes | usize | |
| nodes | u64 | |
| entries | u64 | |
| plaintext_bytes | u64 | |
| depth | usize | |
Source: crates/platinum-core/src/application_release.rs:95
platinum_core::application_release::ReleaseLimits::validate
pub fn validate(&self) -> ReleaseResult<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:116
platinum_core::application_release::ContentDigest
pub struct ContentDigest
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| bytes | u64 | |
| sha256 | Sha256Digest | |
Source: crates/platinum-core/src/application_release.rs:135
platinum_core::application_release::BlobRef
pub struct BlobRef
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| path | String | |
| bytes | u64 | |
| sha256 | Sha256Digest | |
Source: crates/platinum-core/src/application_release.rs:142
platinum_core::application_release::BlobRef::validate
pub fn validate(&self) -> ReleaseResult<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:149
platinum_core::application_release::InventoryNodeRef
pub struct InventoryNodeRef
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| blob | BlobRef | |
| entries | u64 | |
| plaintext_bytes | u64 | |
| nodes | u64 | Includes this node and every descendant. |
Source: crates/platinum-core/src/application_release.rs:155
platinum_core::application_release::InventoryNodeRef::validate
pub fn validate(&self, limits: &ReleaseLimits) -> ReleaseResult<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:166
platinum_core::application_release::ArtifactLocation
pub enum ArtifactLocation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:181
platinum_core::application_release::ArtifactLocation::path
pub fn path(&self) -> &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:186
platinum_core::application_release::ArtifactLocation::validate
pub fn validate(&self) -> ReleaseResult<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:191
platinum_core::application_release::ArtifactRole
pub enum ArtifactRole
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:197
platinum_core::application_release::InventoryEntry
pub struct InventoryEntry
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| location | ArtifactLocation | |
| role | ArtifactRole | |
| bytes | u64 | |
| sha256 | Sha256Digest | |
Source: crates/platinum-core/src/application_release.rs:209
platinum_core::application_release::InventoryNodeV1
pub struct InventoryNodeV1
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| format_version | u32 | |
| entries | Vec<InventoryEntry> | |
| children | Vec<InventoryNodeRef> | |
Source: crates/platinum-core/src/application_release.rs:218
platinum_core::application_release::InventoryNodeV1::totals
pub fn totals(&self) -> ReleaseResult<(u64, u64, u64)>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:224
platinum_core::application_release::RuntimeLinkage
pub enum RuntimeLinkage
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:249
platinum_core::application_release::StaticModuleReceipt
pub struct StaticModuleReceipt
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| name | String | |
| abi | u32 | |
| build_input_sha256 | Sha256Digest | Build-input provenance, NOT a byte range inside the linked executable. |
Source: crates/platinum-core/src/application_release.rs:255
platinum_core::application_release::RuntimeClosure
pub struct RuntimeClosure
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| entrypoint | ArtifactLocation | |
| linkage | RuntimeLinkage | |
| static_modules | Vec<StaticModuleReceipt> | |
Source: crates/platinum-core/src/application_release.rs:263
platinum_core::application_release::ReleaseManifestV1
pub struct ReleaseManifestV1
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| format_version | u32 | |
| application_id | ApplicationGuid | |
| build_id | BuildId | |
| target | String | |
| sdk_abi | u32 | |
| engine_fingerprint | String | |
| package | BlobRef | Hash/length of the final archive, including actual ciphertext if any. |
| inner_manifest | ContentDigest | Hash/length of the exact inner plaintext manifest bytes, not reencoded. |
| inventory | InventoryNodeRef | |
| runtime | RuntimeClosure | |
Source: crates/platinum-core/src/application_release.rs:270
platinum_core::application_release::CanonicalDocument
pub struct CanonicalDocument<T>
Exact bytes are private and immutable. Signing and publishing consume
`as_bytes()`, never a later reserialization of `value()`.
Source: crates/platinum-core/src/application_release.rs:347
platinum_core::application_release::ReleaseDocument
pub trait ReleaseDocument: Serialize + DeserializeOwned
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:351
platinum_core::application_release::CanonicalDocument::create
pub fn create(value: T, limits: &ReleaseLimits) -> ReleaseResult<Self>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:356
platinum_core::application_release::CanonicalDocument::parse
pub fn parse(original: &[u8], limits: &ReleaseLimits) -> ReleaseResult<Self>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:375
platinum_core::application_release::CanonicalDocument::as_bytes
pub fn as_bytes(&self) -> &[u8]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:388
platinum_core::application_release::CanonicalDocument::value
pub fn value(&self) -> &T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:391
platinum_core::application_release::portable_path
pub fn portable_path(value: &str) -> ReleaseResult<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/application_release.rs:485
platinum_core::assets
platinum_core::assets
Headless, domain-neutral asset revision contracts.
This registry validates metadata and dependency closure, not payload hashes,
permissions, decoder safety, or evaluator compatibility. Hosts must verify those
before publishing. Identifiers are names and never confer authority.
Limits apply to already-decoded metadata; a bounded decoder must cap serialized
bytes and collection sizes before allocating untrusted manifests.
Source: crates/platinum-core/src/assets.rs:1
platinum_core::assets::AssetId
pub struct AssetId(pub [u8; 16])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:13
platinum_core::assets::AssetTypeId
pub struct AssetTypeId(pub [u8; 16])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:16
platinum_core::assets::RevisionHash
pub struct RevisionHash(pub [u8; 32])
Host-verified digest of the canonical manifest and payload, including exact
dependency references. The digest algorithm is selected by the host protocol.
Source: crates/platinum-core/src/assets.rs:21
platinum_core::assets::AssetRef
pub struct AssetRef
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | AssetId | |
| revision | RevisionHash | |
Source: crates/platinum-core/src/assets.rs:24
platinum_core::assets::AssetRevision
pub struct AssetRevision
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| reference | AssetRef | |
| asset_type | AssetTypeId | |
| schema_version | u32 | |
| evaluator_version | u32 | |
| payload_bytes | u64 | |
| dependencies | Vec<AssetRef> | |
Source: crates/platinum-core/src/assets.rs:30
platinum_core::assets::RegistryLimits
pub struct RegistryLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_bundle_revisions | usize | |
| max_registry_revisions | usize | |
| max_dependencies_per_revision | usize | |
| max_payload_bytes | u64 | |
Source: crates/platinum-core/src/assets.rs:40
platinum_core::assets::AssetError
pub enum AssetError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:59
platinum_core::assets::AssetRegistry
pub struct AssetRegistry
Immutable revisions with atomically updated current heads. This is an
in-memory transaction boundary, not durable storage or cross-process sync.
Source: crates/platinum-core/src/assets.rs:72
platinum_core::assets::AssetRegistry::new
pub fn new(limits: RegistryLimits) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:85
platinum_core::assets::AssetRegistry::revision
pub fn revision(&self, reference: AssetRef) -> Option<&AssetRevision>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:93
platinum_core::assets::AssetRegistry::head
pub fn head(&self, id: AssetId) -> Option<AssetRef>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:97
platinum_core::assets::AssetRegistry::revision_count
pub fn revision_count(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/assets.rs:101
platinum_core::assets::AssetRegistry::publish_bundle
pub fn publish_bundle(&mut self, bundle: Vec<AssetRevision>) -> Result<(), AssetError>
Publish a complete dependency bundle. Exact old dependencies remain
available after replacing a head. An empty bundle is a no-op. All checks
finish before mutation; input order does not affect dependency resolution.
Hosts arbitrate concurrent authors before this call (no implicit merge).
Source: crates/platinum-core/src/assets.rs:109
platinum_core::binding
platinum_core::binding
Schema-bound, SDK-owned Rust/JSON model handles with explicit transactions.
Clone a `BoundModel` into a UI and read its current snapshot: every handle sees
commits without registering a listener. Snapshots and edit drafts are owned
immutable copies/replacements, not reflected pointers into arbitrary objects.
Mutating a standalone Rust variable or Lua table cannot silently mutate this
model. Host adapters must explicitly commit their owned draft/table changes.
This is in-process state, not transport, authorization, durable storage, a Lua
VM, or an OT/CRDT merge engine. Live authorities validate permissions before
invoking remote updates. Schemas are immutable/pinned for a model's lifetime.
Derived struct declarations supply field names to a normalizing deserializer,
including nested structs/sequences. Case/space/camel/Pascal differences need
no handwritten aliases. Flatten, internally tagged enums, and custom serde
implementations that erase struct metadata cannot promise this mapping.
Ambiguous declared fields/aliases fail rather than selecting an arbitrary one.
Source: crates/platinum-core/src/binding.rs:1
platinum_core::binding::BindingReadiness
pub enum BindingReadiness
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:29
platinum_core::binding::BindingError
pub enum BindingError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:36
platinum_core::binding::ModelSnapshot
pub struct ModelSnapshot<T>
An independent typed read, decoded from the authoritative canonical JSON.
Previously acquired snapshots intentionally stay at their recorded revision;
call `BoundModel::snapshot` again for the current UI read.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | SchemaKey | |
| revision | Generation | |
| readiness | BindingReadiness | |
| value | T | |
| json | Arc<Value> | |
Source: crates/platinum-core/src/binding.rs:64
platinum_core::binding::JsonModelSnapshot
pub struct JsonModelSnapshot
Cheap shared canonical read for data-driven widgets that do not need a Rust
typed conversion on every frame.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | SchemaKey | |
| revision | Generation | |
| readiness | BindingReadiness | |
| json | Arc<Value> | |
Source: crates/platinum-core/src/binding.rs:97
platinum_core::binding::BoundModel
pub struct BoundModel<T>
All clones refer to the same owned model. No user serde/schema code runs
while holding the state lock. Type conversions must accept canonical schema
field names under schema normalization. Custom serde must preserve those
fields without lossy conversion; unsupported metadata paths fail explicitly.
Source: crates/platinum-core/src/binding.rs:108
platinum_core::binding::EditDraft
pub struct EditDraft<T>
Detached local draft. Dropping it cancels edits with no hidden errors or
mutation. A remote commit never silently overwrites its draft contents.
Source: crates/platinum-core/src/binding.rs:128
platinum_core::binding::EditDraft::base_revision
pub fn base_revision(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:135
platinum_core::binding::EditDraft::value
pub fn value(&self) -> &T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:138
platinum_core::binding::EditDraft::value_mut
pub fn value_mut(&mut self) -> &mut T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:141
platinum_core::binding::EditDraft::into_value
pub fn into_value(self) -> T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:144
platinum_core::binding::CommitFailure
pub struct CommitFailure<T>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| error | BindingError | |
| draft | EditDraft<T> | Retained for recovery/rebase; a failed commit never discards local work. |
Source: crates/platinum-core/src/binding.rs:149
platinum_core::binding::CommitReceipt
pub struct CommitReceipt
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | SchemaKey | |
| base_revision | Generation | |
| revision | Generation | |
| canonical_json | Arc<Value> | |
Source: crates/platinum-core/src/binding.rs:165
platinum_core::binding::PreparedModelUpdate
pub struct PreparedModelUpdate
An already-validated local replacement, bound to one model and base revision.
Preparing or dropping this token changes no model state. This is not proof of
authorization, transport delivery or durable storage. Publication still checks
current readiness/revision and may fail if another update won the race.
The token is deliberately non-Clone, non-generic and not deserializable. Its
canonical JSON is immutable; installing it invokes no application serde code.
Source: crates/platinum-core/src/binding.rs:179
platinum_core::binding::PreparedModelUpdate::schema
pub fn schema(&self) -> &SchemaKey
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:188
platinum_core::binding::PreparedModelUpdate::base_revision
pub fn base_revision(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:191
platinum_core::binding::PreparedModelUpdate::revision
pub fn revision(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:194
platinum_core::binding::PreparedModelUpdate::canonical_json
pub fn canonical_json(&self) -> &Arc<Value>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:197
platinum_core::binding::ObjectTableSnapshot
pub struct ObjectTableSnapshot
Host-safe object-table synchronization envelope for JSON/Lua/WASM adapters.
A future Lua feature can map this to VM tables; this module never loads a VM.
Such an adapter must preserve JSON null, array shape, and integer precision
explicitly instead of conflating them with Lua nil or floating point numbers.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | SchemaKey | |
| revision | Generation | |
| object | Arc<Value> | |
Source: crates/platinum-core/src/binding.rs:217
platinum_core::binding::ObjectTableUpdate
pub struct ObjectTableUpdate
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | SchemaKey | |
| base_revision | Generation | |
| object | Value | |
Source: crates/platinum-core/src/binding.rs:224
platinum_core::binding::BoundModel::pending
pub fn pending(schema: Arc<ValidatedSchema>) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:239
platinum_core::binding::BoundModel::from_json
pub fn from_json(
schema: Arc<ValidatedSchema>,
revision: Generation,
object: Value,
) -> Result<Self, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:251
platinum_core::binding::BoundModel::from_json_text
pub fn from_json_text(
schema: Arc<ValidatedSchema>,
revision: Generation,
text: &str,
) -> Result<Self, BindingError>
Bounded parsing preserves duplicate-key detection that would be lost by
first parsing arbitrary text into a serde_json::Value.
Source: crates/platinum-core/src/binding.rs:263
platinum_core::binding::BoundModel::from_rust
pub fn from_rust(
schema: Arc<ValidatedSchema>,
revision: Generation,
value: T,
) -> Result<Self, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:272
platinum_core::binding::BoundModel::detached_copy
pub fn detached_copy(&self) -> Result<Self, BindingError>
Create an independent, schema-validated local model at revision zero.
This is a copy of disclosed data, not a new authority grant or live link.
Source: crates/platinum-core/src/binding.rs:284
platinum_core::binding::BoundModel::detached_copy_with_snapshot
pub fn detached_copy_with_snapshot(&self) -> Result<(Self, JsonModelSnapshot), BindingError>
Return the independent copy and the exact immutable source cut used to
construct it. Concurrent commits through another clone cannot mismatch
the copied bytes and their recorded source revision/provenance.
Source: crates/platinum-core/src/binding.rs:291
platinum_core::binding::BoundModel::parse_object_json
pub fn parse_object_json(&self, text: &str) -> Result<Value, BindingError>
Bounded schema parser for user-authored JSON with duplicate-key checks.
Source: crates/platinum-core/src/binding.rs:298
platinum_core::binding::BoundModel::schema_key
pub fn schema_key(&self) -> SchemaKey
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:302
platinum_core::binding::BoundModel::readiness
pub fn readiness(&self) -> Result<BindingReadiness, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:309
platinum_core::binding::BoundModel::initialize_json
pub fn initialize_json(&self, revision: Generation, object: Value) -> Result<(), BindingError>
A pending model becomes ready only after successful schema AND Rust-type
validation. Failure keeps it pending, allowing an explicit retry.
Source: crates/platinum-core/src/binding.rs:339
platinum_core::binding::BoundModel::snapshot
pub fn snapshot(&self) -> Result<ModelSnapshot<T>, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:350
platinum_core::binding::BoundModel::json_snapshot
pub fn json_snapshot(&self) -> Result<JsonModelSnapshot, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:354
platinum_core::binding::BoundModel::cached_snapshot
pub fn cached_snapshot(&self) -> Result<Option<ModelSnapshot<T>>, BindingError>
Explicit stale-data read for disconnected UI. Normal reads use snapshot()
and fail while unavailable; cached snapshots carry their readiness status.
Source: crates/platinum-core/src/binding.rs:368
platinum_core::binding::BoundModel::cached_json_snapshot
pub fn cached_json_snapshot(&self) -> Result<Option<JsonModelSnapshot>, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:374
platinum_core::binding::BoundModel::set_unavailable
pub fn set_unavailable(&self, message: impl Into<String>) -> Result<(), BindingError>
Marks local data stale without discarding it. A validated remote update
restores readiness. This does not revoke already obtained plaintext.
Source: crates/platinum-core/src/binding.rs:402
platinum_core::binding::BoundModel::begin_edit
pub fn begin_edit(&self) -> Result<EditDraft<T>, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:410
platinum_core::binding::BoundModel::commit
pub fn commit(&self, draft: EditDraft<T>) -> Result<CommitReceipt, CommitFailure<T>>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:421
platinum_core::binding::BoundModel::prepare_edit
pub fn prepare_edit(&self, draft: &EditDraft<T>) -> Result<PreparedModelUpdate, BindingError>
Validate an owned edit without consuming it or changing the live model.
Application serialization/typed roundtrips run outside the model mutex.
Source: crates/platinum-core/src/binding.rs:430
platinum_core::binding::BoundModel::prepare_table
pub fn prepare_table(
&self,
update: &ObjectTableUpdate,
) -> Result<PreparedModelUpdate, BindingError>
Validate a host table while preserving the caller's original update.
Source: crates/platinum-core/src/binding.rs:445
platinum_core::binding::BoundModel::prepare_remote
pub fn prepare_remote(
&self,
expected_revision: Generation,
revision: Generation,
object: &Value,
) -> Result<PreparedModelUpdate, BindingError>
Stage a newer remote snapshot. It may restore initialized stale data to
Ready at publication, but cannot initialize a pending/empty model.
Source: crates/platinum-core/src/binding.rs:462
platinum_core::binding::BoundModel::publish_prepared
pub fn publish_prepared(
&self,
prepared: PreparedModelUpdate,
) -> Result<CommitReceipt, BindingError>
Install only the validated JSON owned by this token. No application
serde/schema callbacks run after publication begins. This local CAS does
not prove that a database transaction or permission check has occurred.
Source: crates/platinum-core/src/binding.rs:498
platinum_core::binding::BoundModel::apply_remote
pub fn apply_remote(
&self,
expected_revision: Generation,
revision: Generation,
object: Value,
) -> Result<CommitReceipt, BindingError>
Whole-object host update with explicit base revision. Newer snapshots may
jump revisions, but an old/out-of-order update never overwrites current data.
Source: crates/platinum-core/src/binding.rs:518
platinum_core::binding::BoundModel::apply_remote_text
pub fn apply_remote_text(
&self,
expected_revision: Generation,
revision: Generation,
text: &str,
) -> Result<CommitReceipt, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:528
platinum_core::binding::BoundModel::table_snapshot
pub fn table_snapshot(&self) -> Result<ObjectTableSnapshot, BindingError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/binding.rs:589
platinum_core::binding::BoundModel::commit_table
pub fn commit_table(&self, update: ObjectTableUpdate) -> Result<CommitReceipt, BindingError>
Explicit host table commit, with the same schema/revision path as Rust.
Canonicalization rejects aliases that collide instead of choosing a winner.
Source: crates/platinum-core/src/binding.rs:600
platinum_core::events
platinum_core::events
Typed, bounded Event Tables for trusted application services.
Ownership scopes select behavior; capabilities independently authorize every
source, table and action. This module does not execute Lua, callbacks or OS
operations. Hosts must execute mandatory policy actions before behavior and
reauthorize at the actual side-effect commit boundary.
Source: crates/platinum-core/src/events.rs:1
platinum_core::events::EventSchema
pub struct EventSchema
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | ResourceId | |
| version | u32 | |
Source: crates/platinum-core/src/events.rs:17
platinum_core::events::Scope
pub struct Scope
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | ResourceId | |
| tenant | TenantId | |
| parent | Option<ResourceId> | |
Source: crates/platinum-core/src/events.rs:23
platinum_core::events::EventSource
pub struct EventSource
Trusted binding prevents an emitter from changing scope/schema to bypass
mandatory handlers while reusing an otherwise valid source capability.
Public data fields| Name | Type / declaration | Description |
|---|
| resource | ResourceId | |
| tenant | TenantId | |
| generation | Generation | |
| scope | ResourceId | |
| schema | EventSchema | |
Source: crates/platinum-core/src/events.rs:32
platinum_core::events::ActionSpec
pub struct ActionSpec<A>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| resource | ResourceId | |
| generation | Generation | |
| data | A | |
Source: crates/platinum-core/src/events.rs:41
platinum_core::events::Handler
pub enum Handler<A>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:48
platinum_core::events::EventTable
pub struct EventTable<A>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | ResourceId | |
| tenant | TenantId | |
| generation | Generation | |
| scope | ResourceId | |
| schema | EventSchema | |
| handlers | Vec<Handler<A>> | |
Source: crates/platinum-core/src/events.rs:64
platinum_core::events::SharedRegistration
pub struct SharedRegistration
Explicit sharing outside the ownership chain. There is no transitive sharing
or cross-tenant federation. Participants still need broker-issued grants.
Public data fields| Name | Type / declaration | Description |
|---|
| id | ResourceId | |
| tenant | TenantId | |
| table | ResourceId | |
| participants | BTreeSet<PrincipalId> | |
Source: crates/platinum-core/src/events.rs:76
platinum_core::events::EventEnvelope
pub struct EventEnvelope<P>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | EventSchema | |
| source | ResourceId | |
| source_generation | Generation | |
| scope | ResourceId | |
| payload | P | |
| cascade_budget | u16 | Trusted host propagation budget; descendants must decrease it. |
Source: crates/platinum-core/src/events.rs:84
platinum_core::events::EventEnvelope::descendant
pub fn descendant<Q>(&self, payload: Q) -> Result<EventEnvelope<Q>, EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:94
platinum_core::events::DispatchContext
pub struct DispatchContext
Authenticated by the host, not accepted from an event payload.
Public data fields| Name | Type / declaration | Description |
|---|
| subject | PrincipalId | |
| tenant | TenantId | |
| source_grant | GrantHandle | |
| table_grants | BTreeMap<ResourceId, GrantHandle> | |
| action_grants | BTreeMap<ResourceId, GrantHandle> | |
| shared_registrations | Vec<ResourceId> | |
Source: crates/platinum-core/src/events.rs:112
platinum_core::events::ActionPhase
pub enum ActionPhase
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:122
platinum_core::events::AuthorizedAction
pub struct AuthorizedAction<A>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| phase | ActionPhase | |
| table | ResourceId | |
| handler | ResourceId | |
| data | A | |
Source: crates/platinum-core/src/events.rs:128
platinum_core::events::AuthorizedAction::authorize_execution
pub fn authorize_execution(
&self,
broker: &mut InMemoryBroker,
now_ms: u64,
) -> Result<(), AccessError>
Call at commit; grant revocation, registry policy changes and registry
destruction invalidate the plan. Hosts serialize this check and its side
effect with policy mutation; this method does not lock external effects.
Source: crates/platinum-core/src/events.rs:145
platinum_core::events::AuthorizedAction::resource
pub fn resource(&self) -> &ResourceId
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:162
platinum_core::events::DispatchResult
pub struct DispatchResult<P, A>
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| payload | P | |
| actions | Vec<AuthorizedAction<A>> | Mandatory policy actions are first. Abort behavior if any policy fails. |
| remaining_cascade_budget | u16 | |
Source: crates/platinum-core/src/events.rs:168
platinum_core::events::EventError
pub enum EventError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:176
platinum_core::events::EventLimits
pub struct EventLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| sources | usize | |
| scopes | usize | |
| tables | usize | |
| handlers_per_table | usize | |
| registrations | usize | |
| participants_per_registration | usize | |
| actions_per_dispatch | usize | |
| cascade_budget | u16 | |
Source: crates/platinum-core/src/events.rs:200
platinum_core::events::EventRegistry
pub struct EventRegistry<A>
Register scopes/tables only through trusted owner APIs. Tables with the same
scope are ordered by stable table ID; scopes run broad to narrow, followed by
explicitly shared tables in stable ID order. Inherited policy is never
replaced. Registration tables cannot override ownership-chain behavior.
Source: crates/platinum-core/src/events.rs:229
platinum_core::events::EventRegistry::new
pub fn new(limits: EventLimits) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:244
platinum_core::events::EventRegistry::register_scope
pub fn register_scope(&mut self, scope: Scope) -> Result<(), EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:262
platinum_core::events::EventRegistry::register_table
pub fn register_table(&mut self, table: EventTable<A>) -> Result<(), EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:280
platinum_core::events::EventRegistry::register_source
pub fn register_source(&mut self, source: EventSource) -> Result<(), EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:300
platinum_core::events::EventRegistry::register_shared
pub fn register_shared(&mut self, registration: SharedRegistration) -> Result<(), EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:318
platinum_core::events::EventRegistry::dispatch
pub fn dispatch<P>(
&self,
broker: &mut InMemoryBroker,
context: &DispatchContext,
event: EventEnvelope<P>,
now_ms: u64,
) -> Result<DispatchResult<P, A>, EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:339
platinum_core::events::EventQueue
pub struct EventQueue<P>
Bounded owned queue. Payload byte/shape limits must also be enforced by the
typed protocol decoder before allocation; this bounds the number of entries.
Source: crates/platinum-core/src/events.rs:495
platinum_core::events::EventQueue::new
pub fn new(capacity: usize) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:500
platinum_core::events::EventQueue::push
pub fn push(&mut self, event: EventEnvelope<P>) -> Result<(), EventError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:506
platinum_core::events::EventQueue::pop
pub fn pop(&mut self) -> Option<EventEnvelope<P>>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:513
platinum_core::events::EventQueue::len
pub fn len(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:516
platinum_core::events::EventQueue::is_empty
pub fn is_empty(&self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/events.rs:519
platinum_core::live
platinum_core::live
Authorized, bounded live resources with atomic scalar and sequence edits.
This is trusted in-process server state, not a network authentication or OS
sandbox. Hosts authenticate `Client`, own the broker, and supply monotonic
time. Persistence/transport adapters must journal before acknowledging a
durable save. Each resource is one disclosure boundary; put fields needing
different permissions in separate resources.
Source: crates/platinum-core/src/live.rs:1
platinum_core::live::Client
pub struct Client
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| principal | PrincipalId | |
| session | SessionId | An authenticated connection/tab identity, never a caller-chosen identity. |
| tenant | TenantId | |
| grant | GrantHandle | |
Source: crates/platinum-core/src/live.rs:28
platinum_core::live::DocumentRef
pub struct DocumentRef
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| tenant | TenantId | |
| resource | ResourceId | |
| generation | Generation | |
Source: crates/platinum-core/src/live.rs:36
platinum_core::live::SequenceId
pub struct SequenceId
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| counter | Generation | |
| actor | PrincipalId | |
| session | SessionId | |
Source: crates/platinum-core/src/live.rs:42
platinum_core::live::TextAtom
pub struct TextAtom
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | SequenceId | |
| after | Option<SequenceId> | |
| value | char | |
| deleted | bool | |
Source: crates/platinum-core/src/live.rs:48
platinum_core::live::TextSequence
pub struct TextSequence
Immutable atom identities and retained tombstones make concurrent insert and
delete operations commute. Compaction needs an explicit new generation.
Source: crates/platinum-core/src/live.rs:57
platinum_core::live::TextSequence::atoms
pub fn atoms(&self) -> &[TextAtom]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:61
platinum_core::live::TextSequence::text
pub fn text(&self) -> Result<String, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:64
platinum_core::live::TextSequence::visible_atoms
pub fn visible_atoms(&self) -> Result<Vec<(SequenceId, char)>, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:69
platinum_core::live::TextSequence::validate
pub fn validate(&self) -> Result<(), LiveError>
Validate the atom graph without allocating an output string or cloning
visible identities. Tombstones remain part of graph validation.
Source: crates/platinum-core/src/live.rs:76
platinum_core::live::FieldValue
pub enum FieldValue
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:277
platinum_core::live::Mutation
pub enum Mutation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:282
platinum_core::live::Transaction
pub struct Transaction
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| operation | Generation | Monotonically increasing per authenticated session and resource. |
| base_revision | Generation | |
| changes | Vec<Mutation> | |
Source: crates/platinum-core/src/live.rs:319
platinum_core::live::Snapshot
pub struct Snapshot
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| document | DocumentRef | |
| revision | Generation | |
| fields | BTreeMap<String, FieldValue> | |
| sequence_clock | Option<Generation> | Causal Lamport clock for generating insert IDs after this snapshot. |
| schema | Option<SchemaKey> | Pinned semantic schema, absent for legacy unschematized resources. |
| effect_format | EffectFormat | Advertised before replay attachment. Missing legacy metadata means the
original materialized format, never an implicit upgrade to compact. |
Source: crates/platinum-core/src/live.rs:326
platinum_core::live::Snapshot::validate_for
pub fn validate_for(
&self,
expected: &DocumentRef,
limits: LiveLimits,
schema: Option<&ValidatedSchema>,
) -> Result<(), LiveError>
Validate an initial/Reset baseline before adopting it. `expected` comes
from the authenticated host connection, never from this snapshot itself.
This neither authenticates the source nor negotiates the advertised effect
format. The caller supplies the exact pinned schema definition, if any.
Defaults and normalized keys must already be present: no silent repair is
performed. Call once at baseline adoption, not before every delta.
Source: crates/platinum-core/src/live.rs:347
platinum_core::live::Snapshot::apply_commit
pub fn apply_commit(
&mut self,
commit: &Commit,
limits: LiveLimits,
schema: Option<&ValidatedSchema>,
) -> Result<(), LiveError>
Apply canonical effects from an authenticated authority, not the original
transaction intent (which may have a stale CRDT base). The caller supplies
the pinned schema definition for schema resources. This is validation,
not authentication, authorization or a durable acknowledgment.
Source: crates/platinum-core/src/live.rs:386
platinum_core::live::Snapshot::next_sequence_counter
pub fn next_sequence_counter(&self) -> Result<Generation, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:505
platinum_core::live::Snapshot::text_changes
pub fn text_changes(&self, field: &str, new_text: &str) -> Result<Vec<Mutation>, LiveError>
Convert a plain-text editor replacement into identity-based operations
against this snapshot. Keep this snapshot while composing; do not diff a
stale draft against unrelated newer text. Formatting/IME integration is
the host editor's responsibility.
Source: crates/platinum-core/src/live.rs:514
platinum_core::live::EffectFormat
pub enum EffectFormat
Wire format is pinned to a live resource. Feature support is not a transport
handshake: hosts must negotiate this advertised format before attachment.
Source: crates/platinum-core/src/live.rs:555
platinum_core::live::EffectFormat::for_current_build
pub const fn for_current_build() -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:562
platinum_core::live::LiveResourceOptions
pub struct LiveResourceOptions
Trusted host creation options after schema/format negotiation. Deliberately
not deserializable or accepted by a client Request. A resource's schema and
effect format are immutable; changing either requires an explicit new resource.
Public data fields| Name | Type / declaration | Description |
|---|
| schema | Option<Arc<ValidatedSchema>> | |
| effect_format | EffectFormat | |
Source: crates/platinum-core/src/live.rs:578
platinum_core::live::FieldEffect
pub enum FieldEffect
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:592
platinum_core::live::Commit
pub struct Commit
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| document | DocumentRef | |
| revision | Generation | |
| previous_revision | Generation | Actual authority predecessor, independent of the transaction's CRDT base. |
| schema | Option<SchemaKey> | |
| effect_format | EffectFormat | |
| sequence_clock | Option<Generation> | |
| effects | Vec<FieldEffect> | Authoritative canonical top-level diff, including defaults and text atoms. |
| principal | PrincipalId | |
| session | SessionId | |
| transaction | Transaction | |
Source: crates/platinum-core/src/live.rs:621
platinum_core::live::Replay
pub enum Replay
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:637
platinum_core::live::Presence
pub struct Presence
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| principal | PrincipalId | |
| session | SessionId | |
| field | Option<String> | |
| expires_at_ms | u64 | |
Source: crates/platinum-core/src/live.rs:642
platinum_core::live::FieldLease
pub struct FieldLease
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| principal | PrincipalId | |
| session | SessionId | |
| field | String | |
| fence | Generation | |
| expires_at_ms | u64 | |
Source: crates/platinum-core/src/live.rs:649
platinum_core::live::LiveLimits
pub struct LiveLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| documents | usize | |
| fields | usize | |
| bytes_per_resource | usize | |
| atoms_per_field | usize | |
| mutations | usize | |
| retained_commits | usize | |
| retained_bytes | usize | |
| sessions_per_resource | usize | |
| max_presence_ms | u64 | |
| max_lease_ms | u64 | |
Source: crates/platinum-core/src/live.rs:657
platinum_core::live::LiveError
pub enum LiveError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:686
platinum_core::live::PreparedLiveCommit
pub struct PreparedLiveCommit
Opaque, single-use in-memory proposal. Preparation has not published state or
established database durability. Dropping it leaves accepted content intact.
Hosts must serialize one resource's preparation/publication and handle stale
candidates explicitly. This is not a portable checkpoint or commit proof.
Source: crates/platinum-core/src/live.rs:738
platinum_core::live::PreparedLiveCommit::commit
pub fn commit(&self) -> &Commit
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:755
platinum_core::live::PreparedLiveCommit::is_replay
pub fn is_replay(&self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:758
platinum_core::live::LiveStore
pub struct LiveStore
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:769
platinum_core::live::LiveStore::new
pub fn new(limits: LiveLimits) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:776
platinum_core::live::LiveStore::disconnect
pub fn disconnect(&mut self, principal: &PrincipalId, session: &SessionId)
Trusted host cleanup after a connection closes or its grant is revoked.
Replay fences remain retained; removing them could reapply an old edit.
Source: crates/platinum-core/src/live.rs:786
platinum_core::live::LiveStore::create
pub fn create(
&mut self,
document: DocumentRef,
fields: BTreeMap<String, FieldValue>,
) -> Result<(), LiveError>
Trusted owner operation. The broker resource must be registered separately.
Source: crates/platinum-core/src/live.rs:800
platinum_core::live::LiveStore::create_with_schema
pub fn create_with_schema(
&mut self,
document: DocumentRef,
fields: BTreeMap<String, FieldValue>,
schema: Arc<ValidatedSchema>,
) -> Result<(), LiveError>
Pin a validated schema to a resource. Required/default/type constraints
apply to creation and every transaction. This implementation supports
scalar fields and top-level string TextSequence fields only. Sequence
arrays/nested sequences and nonempty ACL requirements fail explicitly.
Empty string sequence defaults become empty sequences; nonempty defaults
require a host-seeded TextSequence with real stable atom identities.
Source: crates/platinum-core/src/live.rs:814
platinum_core::live::LiveStore::create_with_options
pub fn create_with_options(
&mut self,
document: DocumentRef,
fields: BTreeMap<String, FieldValue>,
options: LiveResourceOptions,
) -> Result<(), LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:830
platinum_core::live::LiveStore::snapshot
pub fn snapshot(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
now_ms: u64,
) -> Result<Snapshot, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1160
platinum_core::live::LiveStore::commit
pub fn commit(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
tx: Transaction,
now_ms: u64,
) -> Result<Commit, LiveError>
Atomic in-memory state, event log and dedupe publication. Hosts must add
durable journaling before using the acknowledgment as a durable save.
Source: crates/platinum-core/src/live.rs:1172
platinum_core::live::LiveStore::prepare_commit
pub fn prepare_commit(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
mut tx: Transaction,
now_ms: u64,
) -> Result<PreparedLiveCommit, LiveError>
Validate and stage an in-memory mutation without publishing accepted
fields, revisions, replay fences/logs, presence or leases. Authorization
may advance ephemeral monotonic clocks. No durability is implied.
Source: crates/platinum-core/src/live.rs:1186
platinum_core::live::LiveStore::publish_prepared
pub fn publish_prepared(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
prepared: PreparedLiveCommit,
now_ms: u64,
) -> Result<Commit, LiveError>
Consume one prepared proposal after fresh authorization and predecessor
checks. This publishes only in-memory state; it is not proof of an atomic
database commit. Stale/foreign/revoked candidates publish nothing.
Source: crates/platinum-core/src/live.rs:1443
platinum_core::live::LiveStore::replay
pub fn replay(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
after: Generation,
now_ms: u64,
) -> Result<Replay, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1523
platinum_core::live::LiveStore::export
pub fn export(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
now_ms: u64,
) -> Result<Snapshot, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1560
platinum_core::live::LiveStore::set_presence
pub fn set_presence(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
field: Option<String>,
ttl_ms: u64,
now_ms: u64,
) -> Result<(), LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1576
platinum_core::live::LiveStore::presence
pub fn presence(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
now_ms: u64,
) -> Result<Vec<Presence>, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1627
platinum_core::live::LiveStore::acquire_lease
pub fn acquire_lease(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
field: &str,
ttl_ms: u64,
now_ms: u64,
) -> Result<FieldLease, LiveError>
Advisory only: a lease prevents accidental UI contention, not authorized
concurrent sequence edits. Renewal retains its fence while ownership lives.
Source: crates/platinum-core/src/live.rs:1647
platinum_core::live::LiveStore::release_lease
pub fn release_lease(
&mut self,
broker: &mut InMemoryBroker,
client: &Client,
reference: &DocumentRef,
field: &str,
fence: Generation,
now_ms: u64,
) -> Result<(), LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live.rs:1693
platinum_core::live::authority
platinum_core::live::authority
Resource-bound connection dispatch for trusted local/worker/remote adapters.
A connection is installed only by the authenticating host. Request payloads
cannot select a principal, tenant, resource, grant or clock. The process-local
handle is not a wire credential; transports must bind it to their own verified
connection. This module supplies no socket, browser Worker or persistence.
Source: crates/platinum-core/src/live/authority.rs:1
platinum_core::live::authority::Connection
pub struct Connection
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:12
platinum_core::live::authority::Request
pub enum Request
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:23
platinum_core::live::authority::Reply
pub enum Reply
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:34
platinum_core::live::authority::LiveAuthority
pub struct LiveAuthority
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:47
platinum_core::live::authority::LiveAuthority::new
pub fn new(limits: LiveLimits, max_connections: usize) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:57
platinum_core::live::authority::LiveAuthority::create_resource
pub fn create_resource(
&mut self,
reference: DocumentRef,
fields: BTreeMap<String, FieldValue>,
) -> Result<(), LiveError>
Trusted control plane only. Never expose creation to an arbitrary peer.
Source: crates/platinum-core/src/live/authority.rs:69
platinum_core::live::authority::LiveAuthority::create_schema_resource
pub fn create_schema_resource(
&mut self,
reference: DocumentRef,
fields: BTreeMap<String, FieldValue>,
schema: Arc<ValidatedSchema>,
) -> Result<(), LiveError>
Trusted schema-pinned creation. Unsupported field ACLs/sequence forms and
invalid/default-expanded documents fail before consuming a broker resource.
Source: crates/platinum-core/src/live/authority.rs:79
platinum_core::live::authority::LiveAuthority::create_resource_with_options
pub fn create_resource_with_options(
&mut self,
reference: DocumentRef,
fields: BTreeMap<String, FieldValue>,
options: LiveResourceOptions,
) -> Result<(), LiveError>
Trusted host-negotiated options only. No Request can create a resource,
select its schema, or change its pinned effect format.
Source: crates/platinum-core/src/live/authority.rs:97
platinum_core::live::authority::LiveAuthority::connect
pub fn connect(
&mut self,
principal: PrincipalId,
session: SessionId,
reference: DocumentRef,
rights: Rights,
expires_at_ms: u64,
now_ms: u64,
) -> Result<Connection, LiveError>
Host authorizes the requested role before issuing a connection. Business
tags or a request body must never call this method to self-issue rights.
Source: crates/platinum-core/src/live/authority.rs:118
platinum_core::live::authority::LiveAuthority::prepare_commit
pub fn prepare_commit(
&mut self,
connection: &Connection,
transaction: Transaction,
now_ms: u64,
) -> Result<PreparedLiveCommit, LiveError>
Trusted Rust staging seam only. No state is published and no database
durability is implied. Connection expiry/authorization still apply.
Source: crates/platinum-core/src/live/authority.rs:206
platinum_core::live::authority::LiveAuthority::publish_prepared
pub fn publish_prepared(
&mut self,
connection: &Connection,
prepared: PreparedLiveCommit,
now_ms: u64,
) -> Result<Commit, LiveError>
Publish a previously staged in-memory proposal on its authenticated
connection. This is not a durable-provider acknowledgment or wire route.
Source: crates/platinum-core/src/live/authority.rs:220
platinum_core::live::authority::LiveAuthority::dispatch
pub fn dispatch(
&mut self,
connection: &Connection,
request: Request,
now_ms: u64,
) -> Result<Reply, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:235
platinum_core::live::authority::LiveAuthority::dispatch_json
pub fn dispatch_json(
&mut self,
connection: &Connection,
bytes: &[u8],
now_ms: u64,
) -> Result<Reply, LiveError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/authority.rs:300
platinum_core::live::authority::LiveAuthority::disconnect
pub fn disconnect(&mut self, connection: Connection) -> Result<(), LiveError>
Close and revoke together, including ephemeral presence/lease cleanup.
Previously acknowledged data cannot be undisclosed by revocation.
Source: crates/platinum-core/src/live/authority.rs:338
platinum_core::live::AnchorAffinity
pub enum AnchorAffinity
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/text_anchor.rs:7
platinum_core::live::TextAnchor
pub struct TextAnchor
Bind to DocumentRef + field in the surrounding view/sidecar. Atom IDs alone
neither authenticate a document nor identify its generation globally.
Public data fields| Name | Type / declaration | Description |
|---|
| left | Option<SequenceId> | |
| right | Option<SequenceId> | |
| affinity | AnchorAffinity | |
Source: crates/platinum-core/src/live/text_anchor.rs:17
platinum_core::live::CheckpointLimits
pub struct CheckpointLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_bytes | usize | |
| max_nodes | usize | |
| max_depth | usize | |
Source: crates/platinum-core/src/live/checkpoint.rs:10
platinum_core::live::LiveCheckpoint
pub struct LiveCheckpoint
Protected bytes, not an authenticated capability or durable receipt. No
Deserialize/Clone permits bypassing bounded import through another API.
Source: crates/platinum-core/src/live/checkpoint.rs:56
platinum_core::live::LiveCheckpoint::as_bytes
pub fn as_bytes(&self) -> &[u8]
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/checkpoint.rs:60
platinum_core::live::LiveCheckpoint::into_bytes
pub fn into_bytes(self) -> Vec<u8>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live/checkpoint.rs:63
platinum_core::live_view
platinum_core::live_view
Common authorized views over existing schema-bound model storage.
Hosts issue opaque in-process capabilities after authenticating a resource.
IDs and GUI/Lua options do not grant access. Existing BoundModel validation
and revision checks remain authoritative; this is not a second live store,
CRDT, socket transport or operating-system sandbox.
Source: crates/platinum-core/src/live_view.rs:1
platinum_core::live_view::LiveSourceKind
pub enum LiveSourceKind
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:23
platinum_core::live_view::LiveSourceDescriptor
pub struct LiveSourceDescriptor
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| reference | DocumentRef | |
| projection | String | |
| kind | LiveSourceKind | |
Source: crates/platinum-core/src/live_view.rs:29
platinum_core::live_view::LiveViewMode
pub enum LiveViewMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:36
platinum_core::live_view::LiveViewOptions
pub struct LiveViewOptions
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| mode | LiveViewMode | |
| projection | Option<String> | |
Source: crates/platinum-core/src/live_view.rs:45
platinum_core::live_view::LiveViewDefinition
pub struct LiveViewDefinition
Inert GUI/Lua options. Destination is an alias resolved by the trusted host
to an opaque directory capability, never an operating-system path grant.
Public data fields| Name | Type / declaration | Description |
|---|
| options | LiveViewOptions | |
| destination_alias | Option<String> | |
Source: crates/platinum-core/src/live_view.rs:53
platinum_core::live_view::LiveViewDefinition::from_attributes
pub fn from_attributes(attributes: &BTreeMap<String, String>) -> Result<Self, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:58
platinum_core::live_view::LiveViewError
pub enum LiveViewError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:94
platinum_core::live_view::LiveViewAccess
pub enum LiveViewAccess
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:130
platinum_core::live_view::LiveViewAuthority
pub struct LiveViewAuthority
Trusted control plane. This owner receives an existing authoritative model;
it does not open resources by caller-supplied identity or create a live store.
Source: crates/platinum-core/src/live_view.rs:145
platinum_core::live_view::LiveViewHandle
pub struct LiveViewHandle
Opaque, non-serializable process-local access. Never expose authority issuance
methods or its Rust model to untrusted Lua or request handlers.
Source: crates/platinum-core/src/live_view.rs:151
platinum_core::live_view::LiveViewRevocation
pub struct LiveViewRevocation
Retained by the trusted host. Revocation waits for any operation already in
progress; it stops later reads/edits/exports, not already disclosed copies.
Source: crates/platinum-core/src/live_view.rs:158
platinum_core::live_view::LiveViewRevocation::revoke
pub fn revoke(&self) -> Result<(), LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:162
platinum_core::live_view::LiveViewSnapshot
pub struct LiveViewSnapshot
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| source | LiveSourceDescriptor | |
| source_revision | Generation | |
| revision | Generation | |
| detached | bool | |
| json | Arc<Value> | |
Source: crates/platinum-core/src/live_view.rs:171
platinum_core::live_view::LiveViewAuthority::from_model
pub fn from_model(
model: BoundModel<Value>,
descriptor: LiveSourceDescriptor,
) -> Result<Self, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:179
platinum_core::live_view::LiveViewAuthority::issue
pub fn issue(
&self,
access: LiveViewAccess,
allow_copy: bool,
) -> Result<(LiveViewHandle, LiveViewRevocation), LiveViewError>
Called only after host authorization. The resulting handle carries actual
authority; supplying the same resource ID somewhere else does not.
Source: crates/platinum-core/src/live_view.rs:192
platinum_core::live_view::LiveViewAuthority::publish_world
pub fn publish_world(
&self,
epoch: Generation,
tick: Generation,
object: Value,
) -> Result<Generation, LiveViewError>
Host adapter for accepted world projection data, distinct from an authored
scene model. Epoch/tick and model publication are serialized together.
New epochs fence every previously issued view. Model revisions remain
monotonic even when a new world's simulation tick starts at zero.
Source: crates/platinum-core/src/live_view.rs:221
platinum_core::live_view::LiveViewAuthority::replace_generation
pub fn replace_generation(
&self,
model: BoundModel<Value>,
descriptor: LiveSourceDescriptor,
) -> Result<(), LiveViewError>
Explicit host-controlled generation replacement; old handles cannot read
the replacement resource even if its name is unchanged.
Source: crates/platinum-core/src/live_view.rs:251
platinum_core::live_view::LiveViewHandle::snapshot
pub fn snapshot(&self) -> Result<LiveViewSnapshot, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:299
platinum_core::live_view::LiveViewHandle::commit
pub fn commit(
&self,
base_revision: Generation,
object: Value,
) -> Result<Generation, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:302
platinum_core::live_view::LiveViewHandle::commit_json_text
pub fn commit_json_text(
&self,
base_revision: Generation,
text: &str,
) -> Result<Generation, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:316
platinum_core::live_view::LiveViewHandle::attach
pub fn attach(&self, options: LiveViewOptions) -> Result<LiveViewAttachment, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:331
platinum_core::live_view::LiveViewHandle::with_export_snapshot
pub fn with_export_snapshot<R>(
&self,
export: impl FnOnce(&LiveViewSnapshot) -> Result<R, LiveViewError>,
) -> Result<R, LiveViewError>
Authorized export closure executes while the grant/source lock is held,
so a completed revoke cannot race a later permanent copy publication.
Source: crates/platinum-core/src/live_view.rs:363
platinum_core::live_view::LiveViewAttachment
pub enum LiveViewAttachment
Actual live handle or independent existing BoundModel, not a second store.
Do not expose variant internals across an untrusted native FFI boundary.
Source: crates/platinum-core/src/live_view.rs:382
platinum_core::live_view::LiveViewAttachment::can_edit
pub fn can_edit(&self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:393
platinum_core::live_view::LiveViewAttachment::snapshot
pub fn snapshot(&self) -> Result<LiveViewSnapshot, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:402
platinum_core::live_view::LiveViewAttachment::commit
pub fn commit(
&self,
base_revision: Generation,
object: Value,
) -> Result<Generation, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:417
platinum_core::live_view::LiveViewAttachment::commit_json_text
pub fn commit_json_text(
&self,
base_revision: Generation,
text: &str,
) -> Result<Generation, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view.rs:436
platinum_core::live_view::files
platinum_core::live_view::files
Explicit native JSON-model export through a host-issued directory capability.
This creates a new file; it does not reinterpret JSON as a native scene/text
format or bypass a resource's export right. Host directories must be trusted
against concurrent parent/child replacement; portable pathname checks are
not a sandbox. Failed writes retain an explicit orphan path, never unlink a
potentially replaced child by name after releasing its file handle.
Source: crates/platinum-core/src/live_view/files.rs:1
platinum_core::live_view::files::LiveCopyDirectory
pub struct LiveCopyDirectory
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view/files.rs:17
platinum_core::live_view::files::LiveSourceFileLocation
pub struct LiveSourceFileLocation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view/files.rs:25
platinum_core::live_view::files::LiveCopyReceipt
pub struct LiveCopyReceipt
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| path | PathBuf | |
| name | String | |
| bytes_written | usize | |
| source | LiveSourceDescriptor | |
| source_revision | Generation | |
Source: crates/platinum-core/src/live_view/files.rs:30
platinum_core::live_view::files::LiveCopyDirectory::authorize_directory
pub fn authorize_directory(root: &Path) -> Result<Self, LiveViewError>
Trusted host control plane. Never expose this constructor to scripts or
accept an application's string as permission to authorize a directory.
Reject non-UTF-8 native roots before issuing a capability so Lua can
always return its exact path instead of failing after successful creation.
Source: crates/platinum-core/src/live_view/files.rs:87
platinum_core::live_view::files::LiveCopyDirectory::revoke
pub fn revoke(&self) -> Result<(), LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view/files.rs:99
platinum_core::live_view::files::LiveCopyDirectory::source_location
pub fn source_location(
&self,
original_name: &str,
) -> Result<LiveSourceFileLocation, LiveViewError>
Host-owned association between an exported file resource and its actual
authorized parent directory/name. The host supplies this association.
Source: crates/platinum-core/src/live_view/files.rs:108
platinum_core::live_view::files::LiveCopyDirectory::copy_named
pub fn copy_named(
&self,
handle: &LiveViewHandle,
preferred_name: &str,
) -> Result<LiveCopyReceipt, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view/files.rs:120
platinum_core::live_view::files::LiveSourceFileLocation::copy_adjacent
pub fn copy_adjacent(&self, handle: &LiveViewHandle) -> Result<LiveCopyReceipt, LiveViewError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/live_view/files.rs:192
platinum_core::network
platinum_core::network
Bounded network policy, scheduling and authenticated-fragment contracts.
No sockets, encryption, key exchange or anonymity are implemented here. Hosts
must authenticate/decrypt before calling the receiver, verify transport facts,
enforce the selected route in the OS/network broker, and bound wire decoding
before allocation. Message IDs and metadata must be authenticated together.
Source: crates/platinum-core/src/network.rs:1
platinum_core::network::NetworkProfile
pub enum NetworkProfile
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:12
platinum_core::network::Route
pub enum Route
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:18
platinum_core::network::WireTransport
pub enum WireTransport
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:24
platinum_core::network::NameResolution
pub enum NameResolution
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:30
platinum_core::network::RoutePlan
pub struct RoutePlan
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| route | Route | |
| transport | WireTransport | |
| name_resolution | NameResolution | |
| lan_discovery | bool | |
| stun | bool | |
| direct_fallback | bool | |
Source: crates/platinum-core/src/network.rs:36
platinum_core::network::TransportCapabilities
pub struct TransportCapabilities
Trusted results of transport negotiation/verification, never peer assertions.
Public data fields| Name | Type / declaration | Description |
|---|
| encrypted | bool | |
| authenticated_peer | bool | |
| reliable_streams | bool | |
| unreliable_datagrams | bool | |
| participant_e2ee | bool | An external reviewed adapter established participant E2EE separately. |
| max_message_bytes | usize | |
Source: crates/platinum-core/src/network.rs:46
platinum_core::network::PolicyError
pub enum PolicyError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:56
platinum_core::network::NetworkProfile::validate
pub fn validate(
self,
plan: &RoutePlan,
caps: &TransportCapabilities,
require_e2ee: bool,
) -> Result<(), PolicyError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:69
platinum_core::network::ChannelId
pub struct ChannelId(pub u32)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:112
platinum_core::network::MessageKey
pub struct MessageKey
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| session | SessionId | |
| epoch | Generation | |
| channel | ChannelId | |
| sequence | Generation | |
Source: crates/platinum-core/src/network.rs:114
platinum_core::network::Delivery
pub enum Delivery
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:121
platinum_core::network::Delivery::validate
pub fn validate(
self,
profile: NetworkProfile,
plan: &RoutePlan,
caps: &TransportCapabilities,
require_e2ee: bool,
) -> Result<(), PolicyError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:129
platinum_core::network::NegotiatedTransport
pub struct NegotiatedTransport
Validated policy snapshot for a single concrete transport. A host must create
a new value after reconnect/route renegotiation; successful validation is not
permission to silently switch to a different route.
Source: crates/platinum-core/src/network.rs:157
platinum_core::network::NegotiatedTransport::new_with_security_controls
pub fn new_with_security_controls(
profile: NetworkProfile,
plan: RoutePlan,
capabilities: TransportCapabilities,
require_e2ee: bool,
system: crate::security_controls::TunnelPolicy,
application: Option<crate::security_controls::TunnelPolicy>,
peer: crate::security_controls::TunnelPolicy,
request: crate::security_controls::EncryptionRequest,
) -> Result<Self, crate::security_controls::SecurityError>
Admit a concrete authenticated adapter only after bilateral Runtime/app
encryption policy negotiation. Existing profile security still applies;
plaintext remains unsupported by the current encrypted network profiles.
Source: crates/platinum-core/src/network.rs:167
platinum_core::network::NegotiatedTransport::new
pub fn new(
profile: NetworkProfile,
plan: RoutePlan,
capabilities: TransportCapabilities,
require_e2ee: bool,
) -> Result<Self, PolicyError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:182
platinum_core::network::NegotiatedTransport::validate_delivery
pub fn validate_delivery(&self, delivery: Delivery) -> Result<(), PolicyError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:196
platinum_core::network::NegotiatedTransport::profile
pub fn profile(&self) -> NetworkProfile
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:204
platinum_core::network::NegotiatedTransport::route
pub fn route(&self) -> &RoutePlan
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:207
platinum_core::network::OutgoingMessage
pub struct OutgoingMessage
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| key | MessageKey | |
| payload | Vec<u8> | |
| expires_at_ms | Option<u64> | Sender-host monotonic deadline; not a transferable wall-clock timestamp. |
Source: crates/platinum-core/src/network.rs:213
platinum_core::network::SchedulerLimits
pub struct SchedulerLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| channels | usize | |
| queued_messages | usize | |
| queued_bytes | usize | |
| messages_per_channel | usize | |
| bytes_per_channel | usize | |
| message_bytes | usize | |
| max_datagram_ttl_ms | u64 | |
Source: crates/platinum-core/src/network.rs:220
platinum_core::network::NetworkError
pub enum NetworkError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:243
platinum_core::network::SessionScheduler
pub struct SessionScheduler
A scheduler is confined to one authenticated session and fenced epoch.
It never discards reliable messages. `next_ready` is a non-destructive peek;
call `mark_sent` only once the transport accepts ownership. The transport must
then retain/retransmit reliable data until its delivery contract is satisfied.
Source: crates/platinum-core/src/network.rs:273
platinum_core::network::SessionScheduler::new
pub fn new(
session: SessionId,
epoch: Generation,
limits: SchedulerLimits,
transport: NegotiatedTransport,
) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:285
platinum_core::network::SessionScheduler::register_channel
pub fn register_channel(
&mut self,
channel: ChannelId,
delivery: Delivery,
) -> Result<(), NetworkError>
Unsupported delivery is rejected under the negotiated transport policy.
Source: crates/platinum-core/src/network.rs:304
platinum_core::network::SessionScheduler::enqueue
pub fn enqueue(&mut self, message: OutgoingMessage, now_ms: u64) -> Result<(), NetworkError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:349
platinum_core::network::SessionScheduler::next_ready
pub fn next_ready(&mut self, now_ms: u64) -> Result<Option<OutgoingMessage>, NetworkError>
Round-robin channels avoid starving commands behind a snapshot flood.
Returns a clone so the host can await transport acceptance without keeping
a mutable borrow. Do not send the same key twice after acceptance.
A replaced snapshot waits for its outstanding offer to be acknowledged or
released; other channels remain eligible. Repeated peeks of an unchanged
offered snapshot support transport WouldBlock without extra reservations.
Source: crates/platinum-core/src/network.rs:414
platinum_core::network::SessionScheduler::mark_sent
pub fn mark_sent(&mut self, key: &MessageKey) -> Result<(), NetworkError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:447
platinum_core::network::SessionScheduler::release_offer
pub fn release_offer(&mut self, key: &MessageKey) -> Result<(), NetworkError>
Release a snapshot offer that the transport did not accept (for example,
because it became obsolete while awaiting writable capacity). This never
drops the latest queued snapshot. Future/unissued keys remain errors.
Source: crates/platinum-core/src/network.rs:495
platinum_core::network::SessionScheduler::queued_messages
pub fn queued_messages(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:512
platinum_core::network::SessionScheduler::queued_bytes
pub fn queued_bytes(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:515
platinum_core::network::Fragment
pub struct Fragment
All fields, including count/size/expiry, require authenticated framing. This
layer does not authenticate packets or supply a cryptographic replay defense.
Public data fields| Name | Type / declaration | Description |
|---|
| key | MessageKey | |
| index | u16 | |
| count | u16 | |
| total_bytes | usize | |
| expires_at_ms | u64 | Receiver-host monotonic deadline. A transport adapter maps authenticated
sender timing into this domain once per message; duplicate fragments must
retain that same deadline. Never refresh a TTL on retransmission or use a
remote wall-clock value directly as the local monotonic clock. |
| bytes | Vec<u8> | |
Source: crates/platinum-core/src/network.rs:523
platinum_core::network::Reassembly
pub enum Reassembly
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:536
platinum_core::network::ReassemblyLimits
pub struct ReassemblyLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| channels | usize | |
| in_flight | usize | |
| reserved_bytes | usize | |
| message_bytes | usize | |
| fragment_bytes | usize | |
| fragments_per_message | u16 | |
| max_ttl_ms | u64 | |
| max_sequence_gap | u64 | Maximum advance beyond the completed high watermark (initially zero). |
Source: crates/platinum-core/src/network.rs:542
platinum_core::network::FragmentReassembler
pub struct FragmentReassembler
Outputs complete messages in completion order, not reliable stream order.
A reliable transport/adapter must supply ordering/retransmission; realtime
channels can intentionally abandon lost fragments at the bounded deadline.
The 64-message replay window is a protocol limit, not unlimited reordering.
Source: crates/platinum-core/src/network.rs:627
platinum_core::network::FragmentReassembler::new
pub fn new(session: SessionId, epoch: Generation, limits: ReassemblyLimits) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:637
platinum_core::network::FragmentReassembler::register_channel
pub fn register_channel(&mut self, channel: ChannelId) -> Result<(), NetworkError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:648
platinum_core::network::FragmentReassembler::expire
pub fn expire(&mut self, now_ms: u64) -> Result<(), NetworkError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:658
platinum_core::network::FragmentReassembler::receive
pub fn receive(&mut self, fragment: Fragment, now_ms: u64) -> Result<Reassembly, NetworkError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:673
platinum_core::network::FragmentReassembler::in_flight
pub fn in_flight(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:772
platinum_core::network::FragmentReassembler::reserved_bytes
pub fn reserved_bytes(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/network.rs:775
platinum_core::runtime
platinum_core::runtime
Generic runtime contracts, independent of game, GUI and native physics types.
These in-memory authorities are foundations for trusted services, not an OS
sandbox or network authentication mechanism. The service must authenticate
callers and supply monotonic time itself. Never accept either from a client.
Source: crates/platinum-core/src/runtime.rs:1
platinum_core::runtime::MAX_ID_BYTES
pub const MAX_ID_BYTES: usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:16
platinum_core::runtime::InvalidIdentity
pub struct InvalidIdentity
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:18
platinum_core::runtime::new
pub fn new(value: impl Into<String>) -> Self
Trusted names only; panics for invalid input. Parse external data
with `try_new` or serde. A name never proves authority.
Source: crates/platinum-core/src/runtime.rs:34
platinum_core::runtime::try_new
pub fn try_new(value: impl Into<String>) -> Result<Self, InvalidIdentity>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:37
platinum_core::runtime::as_str
pub fn as_str(&self) -> &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:48
platinum_core::runtime::Generation
pub struct Generation(u64)
Fencing generation. Encoded as decimal text to retain all 64 bits in JS.
Source: crates/platinum-core/src/runtime.rs:79
platinum_core::runtime::Generation::new
pub const fn new(value: u64) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:82
platinum_core::runtime::Generation::get
pub const fn get(self) -> u64
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:85
platinum_core::runtime::Generation::checked_next
pub fn checked_next(self) -> Option<Self>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime.rs:88
platinum_core::runtime::Rights
pub struct Rights(u16)
Explicit operation rights; no ambient authority or implicit superuser bit.
Source: crates/platinum-core/src/runtime/capability.rs:9
platinum_core::runtime::Rights::NONE
pub const NONE: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:11
platinum_core::runtime::Rights::READ
pub const READ: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:12
platinum_core::runtime::Rights::EDIT
pub const EDIT: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:13
platinum_core::runtime::Rights::INVOKE
pub const INVOKE: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:14
platinum_core::runtime::Rights::SUBSCRIBE
pub const SUBSCRIBE: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:15
platinum_core::runtime::Rights::EXPORT
pub const EXPORT: Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:16
platinum_core::runtime::Rights::union
pub const fn union(self, other: Self) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:17
platinum_core::runtime::Rights::contains
pub const fn contains(self, requested: Self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:20
platinum_core::runtime::Rights::is_empty
pub const fn is_empty(self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:23
platinum_core::runtime::GrantHandle
pub struct GrantHandle
Process-local opaque reference. Not serializable, a remote credential, or a
guess-resistant wire token. Its authority exists only in the issuing broker.
Source: crates/platinum-core/src/runtime/capability.rs:46
platinum_core::runtime::GrantSpec
pub struct GrantSpec
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| subject | PrincipalId | |
| tenant | TenantId | |
| resource | ResourceId | |
| generation | Generation | |
| rights | Rights | |
| expires_at_ms | u64 | Exclusive expiration in the broker's monotonic millisecond clock. |
Source: crates/platinum-core/src/runtime/capability.rs:57
platinum_core::runtime::AccessRequest
pub struct AccessRequest
All fields describe the authenticated request, not client-asserted identity.
Public data fields| Name | Type / declaration | Description |
|---|
| subject | PrincipalId | |
| tenant | TenantId | |
| resource | ResourceId | |
| generation | Generation | |
| rights | Rights | |
Source: crates/platinum-core/src/runtime/capability.rs:69
platinum_core::runtime::AccessError
pub enum AccessError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:78
platinum_core::runtime::InMemoryBroker
pub struct InMemoryBroker
Trusted, bounded, process-local authority. Owners call registration and issue;
untrusted callers must only reach authenticated service request handlers.
Recheck at an operation's commit boundary; a previous successful check is not
a perpetual authorization. No automatic delegation is supported.
Source: crates/platinum-core/src/runtime/capability.rs:103
platinum_core::runtime::InMemoryBroker::new
pub fn new(max_resources: usize, max_grants: usize) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:115
platinum_core::runtime::InMemoryBroker::register_resource
pub fn register_resource(
&mut self,
resource: ResourceId,
tenant: TenantId,
generation: Generation,
) -> Result<(), AccessError>
Generations may only increase, including after worker/service restart.
Keep resource tombstones so a deleted object cannot be resurrected under
the same generation. A new broker requires new handles/authentication.
Source: crates/platinum-core/src/runtime/capability.rs:133
platinum_core::runtime::InMemoryBroker::issue
pub fn issue(&mut self, spec: GrantSpec, now_ms: u64) -> Result<GrantHandle, AccessError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:170
platinum_core::runtime::InMemoryBroker::revoke
pub fn revoke(&mut self, handle: GrantHandle) -> Result<(), AccessError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:206
platinum_core::runtime::InMemoryBroker::authorize
pub fn authorize(
&mut self,
handle: GrantHandle,
request: &AccessRequest,
now_ms: u64,
) -> Result<(), AccessError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/capability.rs:216
platinum_core::runtime::ProviderMode
pub enum ProviderMode
Provider choice is explicit; remote access never silently falls back to a
direct connection or loads an embedded heavyweight engine.
Source: crates/platinum-core/src/runtime/service.rs:9
platinum_core::runtime::ServiceKey
pub struct ServiceKey
Partition heavyweight services by tenant and authenticated trust domain.
A service name is discovery data, not permission to call the service.
Public data fields| Name | Type / declaration | Description |
|---|
| tenant | TenantId | |
| trust_domain | PrincipalId | |
| service | String | |
Source: crates/platinum-core/src/runtime/service.rs:18
platinum_core::runtime::ActivationClaim
pub struct ActivationClaim
Coordinator-local activation claim. Stale claims cannot publish readiness.
Source: crates/platinum-core/src/runtime/service.rs:26
platinum_core::runtime::ActivationClaim::key
pub fn key(&self) -> &ServiceKey
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:42
platinum_core::runtime::ActivationClaim::generation
pub fn generation(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:45
platinum_core::runtime::ServiceReadiness
pub enum ServiceReadiness
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:51
platinum_core::runtime::ActivationDecision
pub enum ActivationDecision
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:64
platinum_core::runtime::ActivationError
pub enum ActivationError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:71
platinum_core::runtime::ActivationRegistry
pub struct ActivationRegistry
Serial coordinator state machine for single-flight activation. Put it behind
one trusted coordinator or a mutex; separate registries do not elect a global
singleton. OS endpoint locks, peer authentication, worker launch/termination,
durable fencing across coordinator restarts and sandboxing are host work.
Ready entries have finite leases. Workers must stop accepting work when their
lease ends; each operation must check its generation at the authority. This
state machine alone cannot kill an old process or retract disclosed data.
Source: crates/platinum-core/src/runtime/service.rs:95
platinum_core::runtime::ActivationRegistry::new
pub fn new(max_services: usize, max_duration_ms: u64, previous_generation: Generation) -> Self
`previous_generation` must be restored from durable state on restart to
preserve fencing for external workers. Fresh process-local use may use 0.
Source: crates/platinum-core/src/runtime/service.rs:107
platinum_core::runtime::ActivationRegistry::claim
pub fn claim(
&mut self,
key: ServiceKey,
authenticated_starter: PrincipalId,
now_ms: u64,
startup_timeout_ms: u64,
) -> Result<ActivationDecision, ActivationError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:135
platinum_core::runtime::ActivationRegistry::publish_ready
pub fn publish_ready(
&mut self,
claim: &ActivationClaim,
authenticated_starter: &PrincipalId,
endpoint: String,
now_ms: u64,
lease_ms: u64,
) -> Result<ServiceReadiness, ActivationError>
Called only after the host has authenticated the worker and its endpoint.
Endpoint text is bounded here; this does not establish transport security.
Source: crates/platinum-core/src/runtime/service.rs:183
platinum_core::runtime::ActivationRegistry::renew
pub fn renew(
&mut self,
claim: &ActivationClaim,
authenticated_starter: &PrincipalId,
now_ms: u64,
lease_ms: u64,
) -> Result<(), ActivationError>
Renew an already ready worker; a timed-out worker must acquire a new claim.
Source: crates/platinum-core/src/runtime/service.rs:221
platinum_core::runtime::ActivationRegistry::last_generation
pub fn last_generation(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/runtime/service.rs:251
platinum_core::schema
platinum_core::schema
Immutable installed data schemas and transactional JSON canonicalization.
Schemas are ordinary bounded JSON text. Installation is a trusted control
plane operation: this registry provides no privilege separation, publisher
authentication, filesystem protection or broker authorization. ACL metadata
describes requirements; it never issues capabilities. Hosts enforce all ACLs.
Source: crates/platinum-core/src/schema.rs:1
platinum_core::schema::parse_bounded_json
pub fn parse_bounded_json(
text: &str,
limits: SchemaLimits,
max_bytes: usize,
) -> Result<Value, SchemaError>
Bounded duplicate-safe structural JSON decoding for application/provider
frames as well as catalog envelopes. This performs no schema validation,
authentication, authorization or trusted identity provisioning. Callers own
the limits and must validate the resulting typed request before execution.
Source: crates/platinum-core/src/schema.rs:17
platinum_core::schema::SchemaErrorKind
pub enum SchemaErrorKind
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:26
platinum_core::schema::SchemaError
pub struct SchemaError
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| path | String | |
| kind | SchemaErrorKind | |
Source: crates/platinum-core/src/schema.rs:43
platinum_core::schema::SchemaId
pub struct SchemaId(String)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:64
platinum_core::schema::SchemaId::parse
pub fn parse(value: &str) -> Result<Self, SchemaError>
GUID syntax is exactly 8-4-4-4-12 hexadecimal digits; output is lowercase.
Source: crates/platinum-core/src/schema.rs:67
platinum_core::schema::SchemaId::as_str
pub fn as_str(&self) -> &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:81
platinum_core::schema::SchemaKey
pub struct SchemaKey
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | SchemaId | |
| version | u32 | |
Source: crates/platinum-core/src/schema.rs:99
platinum_core::schema::FieldMode
pub enum FieldMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:106
platinum_core::schema::AclMetadata
pub struct AclMetadata
Declarative hints only. Labels cannot grant access, disable mandatory policy,
or authorize fields inside a resource whose broker grant is absent.
Public data fields| Name | Type / declaration | Description |
|---|
| read_capability | Option<String> | |
| edit_capability | Option<String> | |
| sensitivity | Option<String> | |
Source: crates/platinum-core/src/schema.rs:116
platinum_core::schema::ValueType
pub enum ValueType
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:127
platinum_core::schema::FieldDefinition
pub struct FieldDefinition
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| value_type | ValueType | |
| required | bool | |
| default | Option<Value> | |
| mode | FieldMode | |
| acl | Option<AclMetadata> | |
Source: crates/platinum-core/src/schema.rs:159
platinum_core::schema::Schema
pub struct Schema
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| id | SchemaId | |
| version | u32 | |
| name | Option<String> | |
| fields | BTreeMap<String, FieldDefinition> | |
| acl | Option<AclMetadata> | |
Source: crates/platinum-core/src/schema.rs:181
platinum_core::schema::SchemaLimits
pub struct SchemaLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_schema_bytes | usize | |
| max_document_bytes | usize | |
| max_depth | usize | |
| max_nodes | usize | |
| max_fields | usize | |
| max_name_bytes | usize | |
| max_string_bytes | usize | |
| max_array_items | usize | |
| max_schemas | usize | |
Source: crates/platinum-core/src/schema.rs:192
platinum_core::schema::normalize_field_name
pub fn normalize_field_name(value: &str) -> Result<String, SchemaError>
Canonical ASCII snake_case, shared by Rust, Lua and JSON bindings. CamelCase,
acronym boundaries, spaces and hyphens normalize predictably. Unicode is
rejected rather than applying a platform/version-dependent case fold. Rust
keywords remain valid JSON names (`r#type` serializes as `type`); Lua hosts
must use table string keys. Never interpolate a field name into source code.
Source: crates/platinum-core/src/schema.rs:224
platinum_core::schema::ValidatedSchema
pub struct ValidatedSchema
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:354
platinum_core::schema::Schema::parse
pub fn parse(text: &str, limits: SchemaLimits) -> Result<ValidatedSchema, SchemaError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:360
platinum_core::schema::ValidatedSchema::id
pub fn id(&self) -> &SchemaId
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:391
platinum_core::schema::ValidatedSchema::version
pub fn version(&self) -> u32
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:394
platinum_core::schema::ValidatedSchema::name
pub fn name(&self) -> Option<&str>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:397
platinum_core::schema::ValidatedSchema::raw_json
pub fn raw_json(&self) -> &str
Canonical validated plain-text DSL, suitable for protected host storage.
Source: crates/platinum-core/src/schema.rs:401
platinum_core::schema::ValidatedSchema::definition
pub fn definition(&self) -> &Schema
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:404
platinum_core::schema::ValidatedSchema::canonicalize
pub fn canonicalize(&self, value: &Value) -> Result<Value, SchemaError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:407
platinum_core::schema::ValidatedSchema::parse_object
pub fn parse_object(&self, text: &str) -> Result<Value, SchemaError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:450
platinum_core::schema::InstallOrigin
pub enum InstallOrigin
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:771
platinum_core::schema::SchemaRegistry
pub struct SchemaRegistry
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:779
platinum_core::schema::SchemaRegistry::new
pub fn new(limits: SchemaLimits) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:786
platinum_core::schema::SchemaRegistry::install
pub fn install(
&mut self,
schema: ValidatedSchema,
origin: InstallOrigin,
) -> Result<SchemaKey, SchemaError>
Trusted installer only. Third-party publisher identity/signature checks
are host responsibilities; `ThirdParty` alone is not publisher identity.
Source: crates/platinum-core/src/schema.rs:796
platinum_core::schema::SchemaRegistry::get
pub fn get(&self, key: &SchemaKey) -> Option<&ValidatedSchema>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:842
platinum_core::schema::SchemaRegistry::resolve_name
pub fn resolve_name(&self, name: &str, version: u32) -> Result<&ValidatedSchema, SchemaError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema.rs:845
platinum_core::security_controls
platinum_core::security_controls
User-selectable integrity and tunnel controls. Hosts own authenticated transport,
pinned key verification, durable storage, scheduling and user consent. These
controls never claim OS containment or turn a peer assertion into transport proof.
Source: crates/platinum-core/src/security_controls.rs:1
platinum_core::security_controls::IntegrityLevel
pub enum IntegrityLevel
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:9
platinum_core::security_controls::TunnelPolicy
pub struct TunnelPolicy
Global force is a floor; an application cannot lower it. Explicitly allowing
plaintext only permits negotiation; it never bypasses a peer's refusal.
Public data fields| Name | Type / declaration | Description |
|---|
| force_encryption | bool | |
| allow_unencrypted | bool | |
| accept_encrypted | bool | |
Source: crates/platinum-core/src/security_controls.rs:19
platinum_core::security_controls::RuntimeSecuritySettings
pub struct RuntimeSecuritySettings
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| integrity | IntegrityLevel | |
| check_interval_seconds | u64 | |
| cloud_verification | bool | |
| tunnels | TunnelPolicy | |
| application_tunnels | BTreeMap<String, TunnelPolicy> | |
Source: crates/platinum-core/src/security_controls.rs:31
platinum_core::security_controls::SecurityError
pub enum SecurityError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:48
platinum_core::security_controls::RuntimeSecuritySettings::validate
pub fn validate(&self) -> Result<(), SecurityError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:54
platinum_core::security_controls::RuntimeSecuritySettings::check_due
pub fn check_due(&self, last: u64, now: u64, new_session: bool) -> bool
Host timers call this with a trusted monotonic timestamp. Clock rollback
requests a check instead of postponing verification indefinitely.
Source: crates/platinum-core/src/security_controls.rs:63
platinum_core::security_controls::EncryptionRequest
pub enum EncryptionRequest
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:69
platinum_core::security_controls::TunnelEncryption
pub enum TunnelEncryption
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:71
platinum_core::security_controls::TunnelEncryption::validate_transport
pub fn validate_transport(self, encrypted: bool, authenticated_peer: bool) -> Result<(), SecurityError>
Call only with facts from a reviewed authenticated adapter. A successful
policy negotiation does not itself encrypt or authenticate any bytes.
Source: crates/platinum-core/src/security_controls.rs:75
platinum_core::security_controls::negotiate_tunnel
pub fn negotiate_tunnel(
system: TunnelPolicy, application: Option<TunnelPolicy>, peer: TunnelPolicy,
request: EncryptionRequest,
) -> Result<TunnelEncryption, SecurityError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:81
platinum_core::security_controls::FileDigest
pub type FileDigest
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:97
platinum_core::security_controls::file_digest
pub fn file_digest(data: &[u8]) -> FileDigest
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:98
platinum_core::security_controls::MachineIdentity
pub struct MachineIdentity
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| account | String | |
| machine | String | |
| install_guid | String | Stable across upgrades; changing this alone is not proof of a new device. |
| fingerprint | String | Host-supplied privacy-conscious hardware fingerprint, not raw serials. |
Source: crates/platinum-core/src/security_controls.rs:104
platinum_core::security_controls::REINSTALL_WARNING
pub const REINSTALL_WARNING: &str
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:112
platinum_core::security_controls::reinstall_warning
pub fn reinstall_warning(previous: &MachineIdentity, current: &MachineIdentity) -> Option<&'static str>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:113
platinum_core::security_controls::IntegrityStatement
pub struct IntegrityStatement
The host stores this transactionally alongside its registry. Signatures bind
identity, configuration registration, revision and content; hashes alone do not.
Public data fields| Name | Type / declaration | Description |
|---|
| identity | MachineIdentity | |
| application | String | |
| configuration | String | |
| revision | u64 | |
| digest | FileDigest | |
Source: crates/platinum-core/src/security_controls.rs:121
platinum_core::security_controls::IntegrityStatement::signing_bytes
pub fn signing_bytes(&self) -> Vec<u8>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:129
platinum_core::security_controls::SignedStatement
pub struct SignedStatement
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| statement | IntegrityStatement, pub signature: Vec<u8> | |
Source: crates/platinum-core/src/security_controls.rs:137
platinum_core::security_controls::IntegrityCryptography
pub trait IntegrityCryptography
Implement using a maintained PGP/provider library or GPG agent. Verification
must pin the expected account/Hub public key; an embedded key is not trust.
Source: crates/platinum-core/src/security_controls.rs:140
platinum_core::security_controls::IntegrityStatus
pub enum IntegrityStatus
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:156
platinum_core::security_controls::BaselineSource
pub enum BaselineSource
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:158
platinum_core::security_controls::IntegrityRegistry
pub struct IntegrityRegistry
Trusted host-owned registry, never deserialize application-controlled state
into it. Keep its revision counter in durable rollback-protected storage.
Source: crates/platinum-core/src/security_controls.rs:162
platinum_core::security_controls::IntegrityRegistry::pending_statement
pub fn pending_statement(&self, id: &str) -> Option<&SignedStatement>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:164
platinum_core::security_controls::IntegrityRegistry::baseline_source
pub fn baseline_source(&self, id: &str) -> Option<BaselineSource>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:167
platinum_core::security_controls::IntegrityRegistry::register_security_verified
pub fn register_security_verified(&mut self, id: &str, application: &str, configuration: &str) -> Result<(), SecurityError>
Declarative SecurityVerified registration; hosts resolve the ID to their
own authorized file handle. This API deliberately accepts no arbitrary path.
Source: crates/platinum-core/src/security_controls.rs:175
platinum_core::security_controls::IntegrityRegistry::authorized_change
pub fn authorized_change(&mut self, id: &str, identity: &MachineIdentity, data: &[u8], crypto: &mut impl IntegrityCryptography) -> Result<SignedStatement, SecurityError>
Call only after an authorized configuration write, never automatically
upon detecting a mismatch. A legitimate new write retains the old baseline
until an exact signed Hub acknowledgment is verified.
Source: crates/platinum-core/src/security_controls.rs:194
platinum_core::security_controls::IntegrityRegistry::confirm
pub fn confirm(&mut self, id: &str, receipt: SignedStatement, crypto: &impl IntegrityCryptography) -> Result<(), SecurityError>
`receipt` arrives over the authenticated Licensing Hub adapter. Only the
exact latest pending statement may become the new cloud baseline.
Source: crates/platinum-core/src/security_controls.rs:216
platinum_core::security_controls::IntegrityRegistry::confirm_local
pub fn confirm_local(&mut self, id: &str, crypto: &impl IntegrityCryptography) -> Result<(), SecurityError>
Explicit offline opt-out: verify the pending local signature and use it
as a local baseline. It is never reported as cloud confirmed and does
not enable cloud recovery. Persist settings consent before calling.
Source: crates/platinum-core/src/security_controls.rs:232
platinum_core::security_controls::IntegrityRegistry::verify
pub fn verify(&self, id: &str, identity: &MachineIdentity, data: &[u8], level: IntegrityLevel, crypto: &impl IntegrityCryptography) -> Result<IntegrityStatus, SecurityError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/security_controls.rs:242
platinum_core::security_controls::IntegrityRegistry::complete_recovery
pub fn complete_recovery(&mut self, id: &str, data: &[u8], level: IntegrityLevel, crypto: &impl IntegrityCryptography) -> Result<(), SecurityError>
Stage completion of an explicit Highest recovery to the exact current
Hub-confirmed baseline. Cancel speculative newer writes so their late
receipts cannot replace a successfully restored baseline. The highest
issued revision is retained; recovery never invents a cloud confirmation.
Hosts clone the registry and publish this transition only with the
corresponding authorized file replacement and durable state transaction.
Source: crates/platinum-core/src/security_controls.rs:269
platinum_core::security_controls::IntegrityRegistry::verify_recovery
pub fn verify_recovery(&self, id: &str, data: &[u8], level: IntegrityLevel, crypto: &impl IntegrityCryptography) -> Result<(), SecurityError>
Returns verified content for the host's explicit recovery transaction.
The host must obtain the bytes from its authenticated encrypted backup
store and recheck authorization before replacing any live file.
Source: crates/platinum-core/src/security_controls.rs:277
platinum_core::schema_store
platinum_core::schema_store
Native catalog persistence for a privileged/dedicated schema service.
The installer must protect the catalog and its parent directories with OS
ownership/ACLs. A directory path or this Rust type is not proof of protection.
This code never elevates itself. Unprivileged apps cannot acquire write rights
merely by constructing a store; the OS must deny their filesystem access.
The catalog contains inert schemas only, never Lua/native execution or user
document data. Hold one OS file lock for the catalog lifetime.
Source: crates/platinum-core/src/schema_store.rs:1
platinum_core::schema_store::CatalogError
pub enum CatalogError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:21
platinum_core::schema_store::CatalogOrigin
pub enum CatalogOrigin
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:46
platinum_core::schema_store::SchemaCatalog
pub struct SchemaCatalog
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:65
platinum_core::schema_store::reject_reparse
pub fn reject_reparse(path: &Path) -> Result<(), CatalogError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:73
platinum_core::schema_store::read_bounded
pub fn read_bounded(path: &Path, max_bytes: usize) -> Result<String, CatalogError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:87
platinum_core::schema_store::SchemaCatalog::read_installed
pub fn read_installed(
root: impl AsRef<Path>,
key: &SchemaKey,
limits: SchemaLimits,
) -> Result<ValidatedSchema, CatalogError>
Read an immutable version without taking the writer lock. Access still
depends on host ACLs; reading schema definitions never grants document
access. Applications normally obtain this through their authorized host.
Source: crates/platinum-core/src/schema_store.rs:143
platinum_core::schema_store::SchemaCatalog::open
pub fn open(root: impl AsRef<Path>, limits: SchemaLimits) -> Result<Self, CatalogError>
Root must already exist and be protected by the platform installer. Unix
rejects group/world writable catalogs; Windows ACLs are installed by the
service installer, not inferred from the readonly file attribute.
Source: crates/platinum-core/src/schema_store.rs:181
platinum_core::schema_store::SchemaCatalog::registry
pub fn registry(&self) -> &SchemaRegistry
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:255
platinum_core::schema_store::SchemaCatalog::len
pub fn len(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:258
platinum_core::schema_store::SchemaCatalog::is_empty
pub fn is_empty(&self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/schema_store.rs:261
platinum_core::schema_store::SchemaCatalog::install
pub fn install(
&mut self,
schema: ValidatedSchema,
origin: CatalogOrigin,
) -> Result<SchemaKey, CatalogError>
Origin is a trusted installer/host decision, not a schema-provided grant.
Existing versions are immutable. Identical retries return the same key.
Source: crates/platinum-core/src/schema_store.rs:266
platinum_core::service
platinum_core::service
Bounded batch execution for embedded and native thread providers.
A thread is not a sandbox. Each provider exclusively owns one workload and
trust domain, but native memory corruption can cross every thread boundary.
Hosts authenticate callers, select domain/config/clock, and bound decoding
before allocation. This module implements no process activation or physics.
Panic containment applies only to unwinding builds; aborting panics terminate
the host. Workloads are trusted to bound their own transient memory/CPU use.
Source: crates/platinum-core/src/service.rs:1
platinum_core::service::TrustDomainId
pub struct TrustDomainId(pub [u8; 16])
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:17
platinum_core::service::ServiceClock
pub trait ServiceClock: Send + Sync + 'static
Host-owned monotonic clock shared by submission and execution. Browser hosts
provide their own clock; no native timer/thread is required by embedded mode.
Source: crates/platinum-core/src/service.rs:21
platinum_core::service::SteadyClock
pub struct SteadyClock(std::time::Instant)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:26
platinum_core::service::ProviderLimits
pub struct ProviderLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_outstanding | usize | Includes the running batch, not just queued batches. |
| max_commands_per_batch | usize | |
| max_batch_bytes | usize | |
| max_outstanding_bytes | usize | Payload bytes; vector overhead is separately bounded by command count. |
| max_snapshot_bytes | usize | |
| max_error_bytes | usize | |
Source: crates/platinum-core/src/service.rs:43
platinum_core::service::ProviderConfig
pub struct ProviderConfig
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| domain | TrustDomainId | |
| epoch | u64 | |
| generation | u64 | |
| limits | ProviderLimits | |
Source: crates/platinum-core/src/service.rs:68
platinum_core::service::ServiceError
pub enum ServiceError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:76
platinum_core::service::CommandBatch
pub struct CommandBatch
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| domain | TrustDomainId | |
| epoch | u64 | |
| generation | u64 | |
| sequence | u64 | Starts at zero. Rejected submissions do not consume a sequence. |
| deadline_millis | u64 | |
| commands | Vec<Vec<u8>> | |
Source: crates/platinum-core/src/service.rs:97
platinum_core::service::JobReceipt
pub struct JobReceipt
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| domain | TrustDomainId | |
| epoch | u64 | |
| generation | u64 | |
| sequence | u64 | |
| snapshot | Arc<[u8]> | |
Source: crates/platinum-core/src/service.rs:108
platinum_core::service::JobStatus
pub enum JobStatus
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:117
platinum_core::service::JobHandle
pub struct JobHandle
Possession permits cancellation and observation of this job only. Handles
cannot be forged from a domain/sequence and have no wire representation.
Source: crates/platinum-core/src/service.rs:126
platinum_core::service::JobHandle::poll
pub fn poll(&self) -> JobStatus
Nonblocking observation (brief state mutex only), with shared snapshot bytes.
Source: crates/platinum-core/src/service.rs:133
platinum_core::service::JobHandle::cancel
pub fn cancel(&self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:136
platinum_core::service::JobContext
pub struct JobContext
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:141
platinum_core::service::JobContext::check
pub fn check(&self) -> Result<(), ServiceError>
Workloads should check during long operations and at their own commit
boundary. Cancellation is cooperative; the host cannot interrupt native code.
Source: crates/platinum-core/src/service.rs:150
platinum_core::service::BatchWorkload
pub trait BatchWorkload
Implementations own validation and atomic commit/rollback of their batches.
Failure, cancellation after start, output overflow, or panic can follow side
effects: this provider does not claim rollback or exactly-once execution.
`snapshot_limit` allows bounded allocation before producing an output; the
provider also rejects oversized returned snapshots.
Source: crates/platinum-core/src/service.rs:170
platinum_core::service::ProviderPhase
pub enum ProviderPhase
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:180
platinum_core::service::BatchProvider
pub trait BatchProvider
Backend-neutral command interface. Embedded hosts explicitly schedule their
pump; native workers schedule it on their owned thread. Consumers submit
batches and observe handles identically without scalar synchronous calls.
Source: crates/platinum-core/src/service.rs:191
platinum_core::service::EmbeddedProvider
pub struct EmbeddedProvider<W: BatchWorkload>
Embedded mode uses the same queued batch protocol. `pump_one` is explicitly
synchronous work on the caller's thread; submit/poll never execute a workload.
Source: crates/platinum-core/src/service.rs:433
platinum_core::service::EmbeddedProvider::new
pub fn new(
config: ProviderConfig,
clock: Arc<dyn ServiceClock>,
workload: W,
) -> Result<Self, ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:439
platinum_core::service::EmbeddedProvider::phase
pub fn phase(&self) -> ProviderPhase
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:449
platinum_core::service::EmbeddedProvider::submit
pub fn submit(&self, batch: CommandBatch) -> Result<JobHandle, ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:452
platinum_core::service::EmbeddedProvider::pump_one
pub fn pump_one(&mut self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:455
platinum_core::service::EmbeddedProvider::shutdown
pub fn shutdown(&self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:463
platinum_core::service::ThreadProvider
pub struct ThreadProvider
Native scheduling isolation only. Shutdown is nonblocking and cooperative;
`join` explicitly waits and can block forever if workload code never returns.
Drop requests shutdown and detaches rather than hiding a synchronous wait.
Source: crates/platinum-core/src/service.rs:490
platinum_core::service::ThreadProvider::spawn
pub fn spawn<W: BatchWorkload + Send + 'static>(
config: ProviderConfig,
clock: Arc<dyn ServiceClock>,
mut workload: W,
) -> Result<Self, ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:497
platinum_core::service::ThreadProvider::phase
pub fn phase(&self) -> ProviderPhase
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:534
platinum_core::service::ThreadProvider::submit
pub fn submit(&self, batch: CommandBatch) -> Result<JobHandle, ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:537
platinum_core::service::ThreadProvider::shutdown
pub fn shutdown(&self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:540
platinum_core::service::ThreadProvider::join
pub fn join(&mut self) -> Result<(), ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:543
platinum_core::service::ThreadWorkerHost
pub struct ThreadWorkerHost
Trusted local host with a bounded number of independently owned workloads.
Selecting a domain is not authentication; the caller must authorize routing.
Source: crates/platinum-core/src/service.rs:579
platinum_core::service::ThreadWorkerHost::new
pub fn new(max_domains: usize) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:586
platinum_core::service::ThreadWorkerHost::start
pub fn start<W: BatchWorkload + Send + 'static>(
&mut self,
config: ProviderConfig,
clock: Arc<dyn ServiceClock>,
workload: W,
) -> Result<(), ServiceError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:592
platinum_core::service::ThreadWorkerHost::provider
pub fn provider(&self, domain: TrustDomainId) -> Option<&ThreadProvider>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:610
platinum_core::service::ThreadWorkerHost::shutdown
pub fn shutdown(&self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/service.rs:613
platinum_core::service::ThreadWorkerHost::join
pub fn join(&mut self) -> Result<(), ServiceError>
Explicit blocking graceful join of all domains. Shuts down every worker
before joining any one of them and reports an error after joining all.
Source: crates/platinum-core/src/service.rs:620
platinum_core::spatial
platinum_core::spatial
Headless scene/view policy, local audio routing, and simulation queue contracts.
These in-memory contracts do not start a service, render, run physics, or enforce
OS isolation. Hosts authenticate peers and resolve capabilities before accepting
a session, view, or batch. Asset identity alone never joins a live session.
Source: crates/platinum-core/src/spatial.rs:1
platinum_core::spatial::CameraPolicy
pub enum CameraPolicy
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:27
platinum_core::spatial::AudioMode
pub enum AudioMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:34
platinum_core::spatial::SimulationAccess
pub enum SimulationAccess
Ordered access levels describe requested behavior, not possession of a grant.
Source: crates/platinum-core/src/spatial.rs:46
platinum_core::spatial::RenderQuality
pub struct RenderQuality
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| resolution_scale | f32 | |
| max_fps | u16 | |
| shadows | bool | |
| effects | bool | |
Source: crates/platinum-core/src/spatial.rs:55
platinum_core::spatial::ViewPolicy
pub struct ViewPolicy
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| camera | CameraPolicy | |
| quality | RenderQuality | |
| developer_layers | u32 | |
| authored_ui | bool | |
| interact_ui | bool | |
| audio | AudioMode | |
| screen_audio | bool | |
| screen_audio_strength | f32 | |
| simulation | SimulationAccess | |
Source: crates/platinum-core/src/spatial.rs:74
platinum_core::spatial::ViewOverrides
pub struct ViewOverrides
`None` inherits the preceding layer. Each field resolves independently:
framework defaults, application overrides, then viewport overrides.
Public data fields| Name | Type / declaration | Description |
|---|
| camera | Option<CameraPolicy> | |
| quality | Option<RenderQuality> | |
| developer_layers | Option<u32> | |
| authored_ui | Option<bool> | |
| interact_ui | Option<bool> | |
| audio | Option<AudioMode> | |
| screen_audio | Option<bool> | |
| screen_audio_strength | Option<f32> | |
| simulation | Option<SimulationAccess> | |
Source: crates/platinum-core/src/spatial.rs:105
platinum_core::spatial::ViewGrants
pub struct ViewGrants
Upper bounds supplied by the trusted host; these values are not credentials.
Public data fields| Name | Type / declaration | Description |
|---|
| shared_camera_control | bool | |
| developer_layers | u32 | |
| authored_ui | bool | |
| interact_ui | bool | |
| audio_output | bool | |
| screen_audio | bool | User/framework policy can disable screen-position audio globally. |
| simulation | SimulationAccess | |
Source: crates/platinum-core/src/spatial.rs:119
platinum_core::spatial::SpatialError
pub enum SpatialError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:145
platinum_core::spatial::ViewPolicy::resolve
pub fn resolve(
mut self,
application: ViewOverrides,
viewport: ViewOverrides,
grants: ViewGrants,
) -> Result<Self, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:165
platinum_core::spatial::ViewportDescriptor
pub struct ViewportDescriptor
A local presentation binding. Camera, quality, overlays and audio are local
policy; they do not alter the canonical asset or simulation configuration.
Public data fields| Name | Type / declaration | Description |
|---|
| viewport | ViewportId | |
| session | SessionId | |
| policy | ViewPolicy | |
Source: crates/platinum-core/src/spatial.rs:215
platinum_core::spatial::SceneSnapshot
pub struct SceneSnapshot
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| asset | AssetRef | |
| session | SessionId | |
| simulation | SimulationId | |
| epoch | u64 | |
| generation | u64 | |
| tick | u64 | |
Source: crates/platinum-core/src/spatial.rs:222
platinum_core::spatial::SimulationAuthority
pub struct SimulationAuthority
Unforgeable within this safe Rust API, registry-bound and deliberately not
cloneable/serializable. Cross-process hosts need independently verified grants.
Source: crates/platinum-core/src/spatial.rs:238
platinum_core::spatial::LiveSceneRegistry
pub struct LiveSceneRegistry
Multiple viewports sample one authority tick. Creating a second session from
the same asset requires a distinct simulation; it never aliases mutable state.
Source: crates/platinum-core/src/spatial.rs:246
platinum_core::spatial::LiveSceneRegistry::new
pub fn new(max_sessions: usize, max_views: usize) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:256
platinum_core::spatial::LiveSceneRegistry::create_session
pub fn create_session(
&mut self,
asset: AssetRef,
session: SessionId,
simulation: SimulationId,
epoch: u64,
) -> Result<SimulationAuthority, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:267
platinum_core::spatial::LiveSceneRegistry::attach_view
pub fn attach_view(
&mut self,
session: SessionId,
viewport: ViewportId,
) -> Result<SceneSnapshot, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:314
platinum_core::spatial::LiveSceneRegistry::attach_view_with_policy
pub fn attach_view_with_policy(
&mut self,
mut descriptor: ViewportDescriptor,
grants: ViewGrants,
) -> Result<SceneSnapshot, SpatialError>
Hosts supply resolved grants after checking session membership. A denied
or malformed descriptor never changes registry state.
Source: crates/platinum-core/src/spatial.rs:334
platinum_core::spatial::LiveSceneRegistry::viewport_descriptor
pub fn viewport_descriptor(&self, viewport: ViewportId) -> Option<&ViewportDescriptor>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:362
platinum_core::spatial::LiveSceneRegistry::detach_view
pub fn detach_view(&mut self, viewport: ViewportId) -> Result<(), SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:366
platinum_core::spatial::LiveSceneRegistry::view_snapshot
pub fn view_snapshot(&self, viewport: ViewportId) -> Result<SceneSnapshot, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:379
platinum_core::spatial::LiveSceneRegistry::advance_tick
pub fn advance_tick(
&mut self,
authority: &SimulationAuthority,
expected_tick: u64,
) -> Result<SceneSnapshot, SpatialError>
Compare-and-advance once per expected authority tick. Drawing/attaching a
view has no path to this method without the authority token.
Source: crates/platinum-core/src/spatial.rs:389
platinum_core::spatial::LiveSceneRegistry::close_session
pub fn close_session(&mut self, session: SessionId) -> Result<(), SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:413
platinum_core::spatial::AudioCue
pub struct AudioCue
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| session | SessionId | |
| epoch | u64 | |
| cue | CueId | |
Source: crates/platinum-core/src/spatial.rs:426
platinum_core::spatial::AudioView
pub struct AudioView
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| viewport | ViewportId | |
| session | SessionId | |
| epoch | u64 | |
| mode | AudioMode | |
Source: crates/platinum-core/src/spatial.rs:433
platinum_core::spatial::AudioRouter
pub struct AudioRouter
One router per local user/audio routing context. Retains a bounded replay
window; hosts reject stale epochs/cue sequences outside that window. This is
presentation deduplication, not exactly-once durable delivery.
Source: crates/platinum-core/src/spatial.rs:443
platinum_core::spatial::AudioRouter::new
pub fn new(capacity: usize) -> Result<Self, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:451
platinum_core::spatial::AudioRouter::with_limits
pub fn with_limits(capacity: usize, max_views: usize) -> Result<Self, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:455
platinum_core::spatial::AudioRouter::route
pub fn route(
&mut self,
cue: AudioCue,
views: &[AudioView],
focused: Option<ViewportId>,
) -> Result<Vec<ViewportId>, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:467
platinum_core::spatial::screen_pan_offset
pub fn screen_pan_offset(
center_x: f64,
display_left: f64,
display_width: f64,
enabled: bool,
strength: f64,
) -> Result<f64, SpatialError>
Screen geometry stays local. `center_x` and display bounds use the same local
logical coordinate space; callers choose the physical display/speaker mapping.
Returns a clamped stereo pan offset to blend after world spatialization.
Source: crates/platinum-core/src/spatial.rs:522
platinum_core::spatial::SimulationBatch
pub struct SimulationBatch
Opaque commands are validated by the selected engine adapter before execution.
Deadline units belong to an agreed monotonic provider clock, never wall time.
Public data fields| Name | Type / declaration | Description |
|---|
| simulation | SimulationId | |
| generation | u64 | |
| sequence | u64 | |
| deadline_millis | u64 | |
| commands | Vec<Vec<u8>> | |
Source: crates/platinum-core/src/spatial.rs:551
platinum_core::spatial::BatchLimits
pub struct BatchLimits
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| max_pending | usize | |
| max_commands_per_batch | usize | |
| max_batch_bytes | usize | Command payload bytes; command-vector overhead is bounded separately by count. |
| max_pending_bytes | usize | |
Source: crates/platinum-core/src/spatial.rs:560
platinum_core::spatial::SimulationBatchQueue
pub struct SimulationBatchQueue
Bounded, ordered control queue for one provider world/generation. Embedded
and IPC adapters can use the same contract; neither backend is implemented
here. Decode limits and authentication must be applied before allocating input.
Source: crates/platinum-core/src/spatial.rs:582
platinum_core::spatial::SimulationBatchQueue::new
pub fn new(
simulation: SimulationId,
generation: u64,
limits: BatchLimits,
) -> Result<Self, SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:592
platinum_core::spatial::SimulationBatchQueue::submit
pub fn submit(&mut self, batch: SimulationBatch, now_millis: u64) -> Result<(), SpatialError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:610
platinum_core::spatial::SimulationBatchQueue::pop
pub fn pop(&mut self, now_millis: u64) -> Option<Result<SimulationBatch, SpatialError>>
Expired queued work is removed and reported, never executed. A consumed
sequence remains consumed even if it expires: retries need a new sequence.
Source: crates/platinum-core/src/spatial.rs:654
platinum_core::spatial::SimulationBatchQueue::pending_count
pub fn pending_count(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:664
platinum_core::spatial::SimulationBatchQueue::pending_bytes
pub fn pending_bytes(&self) -> usize
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/spatial.rs:667
platinum_core::tracked
platinum_core::tracked
Owned speculative state with bounded, explicit submission to existing authorities.
A packet is a proposal, never a durable save or authorization decision. Hosts
submit it through their authenticated authority, retain it for transport retry,
and acknowledge only the matching reply. This module creates no threads, IPC,
journal, or alternative authority. Coalescing is for replaceable draft/settings
state: business commands and append-only history require a separate command queue.
Mutation through `DerefMut` marks conservatively once per borrow. Mutations
through interior mutability are not observed: do not put independently mutable
cells, shared pointers or external resources inside a tracked root. Ordinary
owned primitives and collections work without per-field wrappers. Time is a
host-supplied monotonic millisecond counter; ordinary edits use the last observed
timestamp. Use `edit_at` when precise maximum dirty age matters.
Source: crates/platinum-core/src/tracked.rs:1
platinum_core::tracked::CommitPolicy
pub struct CommitPolicy
Submission cadence, not a durability deadline. `max_unsynced_age` overrides
throttling while polling, but cannot bypass an in-flight request, conflict,
failed validation, unavailable authority, or a host that stops polling.
Public data fields| Name | Type / declaration | Description |
|---|
| min_interval | Duration | |
| max_unsynced_age | Duration | |
Source: crates/platinum-core/src/tracked.rs:34
platinum_core::tracked::TrackingMode
pub enum TrackingMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:47
platinum_core::tracked::CommitPacket
pub struct CommitPacket
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| document | DocumentRef | |
| expected_revision | Generation | |
| edit_generation | Generation | |
| payload | Value | |
Source: crates/platinum-core/src/tracked.rs:54
platinum_core::tracked::TrackingConflict
pub struct TrackingConflict
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| edit_generation | Generation | |
| reason | String | |
Source: crates/platinum-core/src/tracked.rs:61
platinum_core::tracked::PrepareError
pub enum PrepareError
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:66
platinum_core::tracked::Tracked
pub struct Tracked<T>
A local owned draft. `local` bypasses dirty bookkeeping and serialization.
This type deliberately does not implement Clone: duplicating a pending flight
would create two independent clients with one transaction identity.
Source: crates/platinum-core/src/tracked.rs:101
platinum_core::tracked::Tracked::local
pub fn local(value: T) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:130
platinum_core::tracked::Tracked::new
pub fn new(value: T, document: DocumentRef, revision: Generation, mode: TrackingMode) -> Self
`value` is an already loaded snapshot at `revision`; initially clean.
Source: crates/platinum-core/src/tracked.rs:137
platinum_core::tracked::Tracked::with_schema
pub fn with_schema(mut self, schema: Arc<ValidatedSchema>) -> Self
Proposals must already use canonical field names and contain schema defaults.
Preparation rejects normalization changes rather than acknowledging a value
different from the typed local draft. Normalize/repair that draft explicitly.
Source: crates/platinum-core/src/tracked.rs:158
platinum_core::tracked::Tracked::get
pub fn get(&self) -> &T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:164
platinum_core::tracked::Tracked::get_mut
pub fn get_mut(&mut self) -> &mut T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:167
platinum_core::tracked::Tracked::set
pub fn set(&mut self, value: T)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:171
platinum_core::tracked::Tracked::edit
pub fn edit<R>(&mut self, edit: impl FnOnce(&mut T) -> R) -> R
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:175
platinum_core::tracked::Tracked::edit_at
pub fn edit_at<R>(
&mut self,
now_ms: u64,
edit: impl FnOnce(&mut T) -> R,
) -> Result<R, PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:178
platinum_core::tracked::Tracked::observe_time
pub fn observe_time(&mut self, now_ms: u64) -> Result<(), PrepareError>
Advances the clock without scanning/serializing any application state.
Source: crates/platinum-core/src/tracked.rs:187
platinum_core::tracked::Tracked::is_due
pub fn is_due(&mut self, now_ms: u64, manual: bool) -> Result<bool, PrepareError>
Checks scheduling metadata only; no serialization or data traversal.
Source: crates/platinum-core/src/tracked.rs:197
platinum_core::tracked::Tracked::mark_dirty
pub fn mark_dirty(&mut self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:219
platinum_core::tracked::Tracked::mode
pub fn mode(&self) -> TrackingMode
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:235
platinum_core::tracked::Tracked::is_dirty
pub fn is_dirty(&self) -> bool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:238
platinum_core::tracked::Tracked::dirty_since
pub fn dirty_since(&self) -> Option<u64>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:241
platinum_core::tracked::Tracked::generation
pub fn generation(&self) -> Generation
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:244
platinum_core::tracked::Tracked::in_flight
pub fn in_flight(&self) -> Option<Generation>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:249
platinum_core::tracked::Tracked::conflict
pub fn conflict(&self) -> Option<&TrackingConflict>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:252
platinum_core::tracked::Tracked::authority_revision
pub fn authority_revision(&self) -> Option<Generation>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:255
platinum_core::tracked::Tracked::document
pub fn document(&self) -> Option<&DocumentRef>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:258
platinum_core::tracked::Tracked::set_if_changed
pub fn set_if_changed(&mut self, value: T) -> bool
where
T: PartialEq,
Avoids conservative dirty marking when the caller already has a candidate
value. Comparison is explicit and requires no clone or serialization.
Source: crates/platinum-core/src/tracked.rs:263
platinum_core::tracked::Tracked::edit_if_changed
pub fn edit_if_changed<R>(&mut self, edit: impl FnOnce(&mut T) -> R) -> R
where
T: Clone + PartialEq,
Opt-in no-op filtering for UI editors. Managed values clone a draft;
local/off mode edits directly without cloning or comparing anything.
Source: crates/platinum-core/src/tracked.rs:275
platinum_core::tracked::Tracked::edit_with_baseline
pub fn edit_with_baseline<R>(&mut self, before: &T, edit: impl FnOnce(&mut T) -> R) -> R
where
T: PartialEq,
Reuses a caller's existing immutable undo snapshot instead of cloning a
second draft. `before` must describe this value immediately before edit;
a stale baseline can cause conservative false dirtiness. The guard marks
changed state during unwinding too, so a panic cannot hide partial edits.
Source: crates/platinum-core/src/tracked.rs:291
platinum_core::tracked::Tracked::refresh
pub fn refresh(&mut self, value: T, revision: Generation) -> Result<(), PrepareError>
Applies a newer read-cache snapshot only when there is no local work to
lose. Dirty/flight/conflict state requires explicit application merge.
Source: crates/platinum-core/src/tracked.rs:317
platinum_core::tracked::Tracked::restore_from_authority
pub fn restore_from_authority(
&mut self,
revision: Generation,
value: T,
) -> Result<(), PrepareError>
Hydrates an initial/recovered authority snapshot. A local draft always
wins over implicit hydration: retain it and expose a conflict for review.
Source: crates/platinum-core/src/tracked.rs:334
platinum_core::tracked::Tracked::set_mode
pub fn set_mode(&mut self, mode: TrackingMode) -> Result<(), PrepareError>
Cannot hide an unresolved submission. Off preserves any existing unsaved
draft but ignores subsequent edits; re-enabling schedules the whole value.
Source: crates/platinum-core/src/tracked.rs:359
platinum_core::tracked::Tracked::acknowledge
pub fn acknowledge(
&mut self,
generation: Generation,
authority_revision: Generation,
) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:371
platinum_core::tracked::Tracked::reject
pub fn reject(&mut self, generation: Generation, reason: String) -> Result<(), PrepareError>
Retains the entire local draft and pauses automatic retries for explicit
conflict/permission handling. A rejection is not permission to overwrite.
Source: crates/platinum-core/src/tracked.rs:395
platinum_core::tracked::Tracked::resolve_rebase
pub fn resolve_rebase(&mut self, revision: Generation) -> Result<(), PrepareError>
Caller must explicitly merge/review the retained draft against the latest
authority snapshot before using this. No automatic last-writer-wins merge.
Source: crates/platinum-core/src/tracked.rs:410
platinum_core::tracked::Tracked::transaction
pub fn transaction<R, E>(&mut self, edit: impl FnOnce(&mut T) -> Result<R, E>) -> Result<R, E>
where
T: Clone,
A fallible, explicit edit transaction. Err or panic leaves the live draft
untouched. Cloning occurs only when this rollback facility is requested.
Source: crates/platinum-core/src/tracked.rs:425
platinum_core::tracked::Tracked::into_inner
pub fn into_inner(self) -> T
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:434
platinum_core::tracked::Tracked::prepare
pub fn prepare(&mut self, now_ms: u64) -> Result<Option<CommitPacket>, PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:439
platinum_core::tracked::Tracked::prepare_manual
pub fn prepare_manual(&mut self, now_ms: u64) -> Result<Option<CommitPacket>, PrepareError>
Flushes auto or manual state without rate limiting. Off remains fully off.
Source: crates/platinum-core/src/tracked.rs:443
platinum_core::tracked::TrackedString
pub type TrackedString
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:498
platinum_core::tracked::TrackedVec
pub type TrackedVec<T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:499
platinum_core::tracked::TrackedMap
pub type TrackedMap<K, V>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:500
platinum_core::tracked::TrackedBool
pub type TrackedBool
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:501
platinum_core::tracked::TrackedU64
pub type TrackedU64
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked.rs:502
platinum_core::tracked::PatchPacket
pub struct PatchPacket
Granular intent for the existing live authority. The transport supplies its
authenticated session's operation ID when constructing `live::Transaction`.
These are scalar field edits, not CRDT sequence or durable business commands.
Public data fields| Name | Type / declaration | Description |
|---|
| document | DocumentRef | |
| expected_revision | Generation | |
| edit_generation | Generation | |
| changes | Vec<Mutation> | |
Source: crates/platinum-core/src/tracked/record.rs:9
platinum_core::tracked::TrackedRecord
pub struct TrackedRecord<T>
Field-granular tracked container. `T` may be an application enum for
heterogeneous fields, a serde JSON value, a primitive, or a typed record.
Choose stable authority field names; dynamic list rows generally deserve
stable row resources instead of array-offset field identities.
No full-map scans, clones, serialization, or diffs occur on mutation or
prepare. Preparing serializes only dirty values; the authority performs final
schema/permission validation atomically using existing `live::Transaction`.
Removed field tombstones survive until the matching ACK. Local/off bypasses
the dirty ledger entirely. Enabling tracking after Off is an explicit O(n)
full field resync, including deletions recorded while Off was active.
Source: crates/platinum-core/src/tracked/record.rs:27
platinum_core::tracked::TrackedRecord::new
pub fn new(
values: BTreeMap<String, T>,
document: DocumentRef,
revision: Generation,
mode: TrackingMode,
) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:36
platinum_core::tracked::TrackedRecord::local
pub fn local(values: BTreeMap<String, T>) -> Self
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:50
platinum_core::tracked::TrackedRecord::get
pub fn get(&self, field: &str) -> Option<&T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:58
platinum_core::tracked::TrackedRecord::values
pub fn values(&self) -> &BTreeMap<String, T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:61
platinum_core::tracked::TrackedRecord::tracker
pub fn tracker(&self) -> &Tracked<()>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:64
platinum_core::tracked::TrackedRecord::observe_time
pub fn observe_time(&mut self, now_ms: u64) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:67
platinum_core::tracked::TrackedRecord::is_due
pub fn is_due(&mut self, now_ms: u64, manual: bool) -> Result<bool, PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:70
platinum_core::tracked::TrackedRecord::restore_from_authority
pub fn restore_from_authority(
&mut self,
revision: Generation,
values: BTreeMap<String, T>,
) -> Result<(), PrepareError>
Hydrates only a clean record. Authority data cannot overwrite retained
local changes or an unresolved flight; conflicts pause automatic sends.
Source: crates/platinum-core/src/tracked/record.rs:75
platinum_core::tracked::TrackedRecord::set
pub fn set(&mut self, field: impl Into<String>, value: T) -> Option<T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:99
platinum_core::tracked::TrackedRecord::remove
pub fn remove(&mut self, field: &str) -> Option<T>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:104
platinum_core::tracked::TrackedRecord::edit
pub fn edit<R>(&mut self, field: &str, edit: impl FnOnce(&mut T) -> R) -> Option<R>
Conservatively marks a field before the closure, including panic paths.
Source: crates/platinum-core/src/tracked/record.rs:112
platinum_core::tracked::TrackedRecord::transaction
pub fn transaction<R, E>(
&mut self,
field: &str,
edit: impl FnOnce(&mut T) -> Result<R, E>,
) -> Option<Result<R, E>>
where
T: Clone,
Fallible field edit; failing/cancelled drafts never dirty the container.
Source: crates/platinum-core/src/tracked/record.rs:120
platinum_core::tracked::TrackedRecord::set_mode
pub fn set_mode(&mut self, mode: TrackingMode) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:137
platinum_core::tracked::TrackedRecord::acknowledge
pub fn acknowledge(
&mut self,
generation: Generation,
revision: Generation,
) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:161
platinum_core::tracked::TrackedRecord::reject
pub fn reject(&mut self, generation: Generation, reason: String) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:171
platinum_core::tracked::TrackedRecord::resolve_rebase
pub fn resolve_rebase(&mut self, revision: Generation) -> Result<(), PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:174
platinum_core::tracked::TrackedRecord::pending_changes
pub fn pending_changes(&self) -> impl Serialize + '_
Borrowed wire-shaped changes for bounded preflight before allocating a
packet. Visits dirty keys only; does not mark an in-flight generation.
Source: crates/platinum-core/src/tracked/record.rs:181
platinum_core::tracked::TrackedRecord::prepare
pub fn prepare(&mut self, now_ms: u64) -> Result<Option<PatchPacket>, PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:204
platinum_core::tracked::TrackedRecord::prepare_manual
pub fn prepare_manual(&mut self, now_ms: u64) -> Result<Option<PatchPacket>, PrepareError>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/tracked/record.rs:207
platinum_core::tracked::OwnedPreparation
pub struct OwnedPreparation<T>
One exact speculative edit generation. No borrowed application data or Rust
allocator pointers cross the eventual IPC boundary. Not Clone: duplicating a
reserved flight would manufacture independent jobs for one edit identity.
Public data fields| Name | Type / declaration | Description |
|---|
| document | DocumentRef | |
| expected_revision | Generation | |
| edit_generation | Generation | |
Source: crates/platinum-core/src/tracked/deferred.rs:9
platinum_core::tracked::OwnedPreparation::encode_bounded
pub fn encode_bounded(
self,
validate: impl FnOnce(&T) -> Result<(), String>,
limit: usize,
) -> Result<CommitPacket, PrepareError>
Run on the selected host lane. Failure is not an authority rejection by
itself: deliver a matching failure receipt to retain/unblock the draft.
Source: crates/platinum-core/src/tracked/deferred.rs:91
platinum_core::ui_document
platinum_core::ui_document
Canonical renderer-free authored UI documents, styles, layout and transactions.
Extracted from the SDK game UI implementation; no game identities, rendering,
file loading or action execution are part of this module. Assets remain inert
data. Hosts authorize dependencies/actions and sandbox external parsers.
Parse entrypoints and validation apply conservative default byte, element,
attribute and depth budgets. Deserialize of public serde types alone is not
validation: bound bytes before decoding and call `validate` before use. Layout
and serialization reject invalid documents. Bounds limit allocation/work but
do not constitute process isolation or a hostile-code security boundary.
Source: crates/platinum-core/src/ui_document.rs:1
platinum_core::ui_document::UiLimits
pub struct UiLimits
Allocation and work budgets for authored UI parsing and validation.
Defaults allow 2 MiB source/content, 16,384 elements, depth 128, 128
attributes per element, 4,096 stylesheet rules and finite dimensions up to
1,000,000. A tighter host budget can reject otherwise valid assets. These
limits do not authorize dependencies, execute actions or isolate a parser.
Public data fields| Name | Type / declaration | Description |
|---|
| source_bytes | usize | Maximum source and validated-content byte budget. |
| elements | usize | Maximum elements in one document. |
| depth | usize | Maximum element hierarchy depth, including the element itself. |
| attributes_per_element | usize | Maximum authored attributes per element. |
| stylesheet_rules | usize | Maximum rules in one parsed stylesheet. |
| dimension | f32 | Positive finite bound used when validating canvas/layout dimensions. |
Source: crates/platinum-core/src/ui_document.rs:31
platinum_core::ui_document::UiElementId
pub type UiElementId
Stable exact integer identity within one UI document.
Identity is independent of element position or label. Wire adapters must
preserve the full u64 range; do not round IDs through a JavaScript number.
Source: crates/platinum-core/src/ui_document/document.rs:23
platinum_core::ui_document::UiElement
pub struct UiElement
One authored widget and its inert string-valued attributes.
`parent` refers to another element in the same document; `None` attaches to
the document root. `kind` uses the validated widget vocabulary. An action
or asset path in `attributes` is data for an authorized host to resolve,
never permission to execute code or open a file.
Public data fields| Name | Type / declaration | Description |
|---|
| id | UiElementId | Unique document-local identity; survives ordering and label changes. |
| parent | Option<UiElementId> | Parent identity in this document, or the canvas root when absent. |
| kind | String | Validated element tag, such as `button`, `input` or `panel`. |
| attributes | BTreeMap<String, String> | Authored layout/style/widget values; reserved `id` stays in `id`. |
| text | String | Direct text content, interpreted as text rather than executable markup. |
Source: crates/platinum-core/src/ui_document/document.rs:31
platinum_core::ui_document::UiElement::live_view_definition
pub fn live_view_definition(&self) -> Result<crate::live_view::LiveViewDefinition, crate::live_view::LiveViewError>
Parse common LiveView options. Source and destination names remain inert:
the host resolves them to opaque authorized handles/capabilities.
Source: crates/platinum-core/src/ui_document/document.rs:48
platinum_core::ui_document::UiElement::number
pub fn number(&self, name: &str, fallback: f32) -> f32
Read a finite numeric attribute, accepting an optional trailing `px`.
Missing, malformed or non-finite values return `fallback`; this helper
does not replace full document validation or check a field's domain.
Source: crates/platinum-core/src/ui_document/document.rs:55
platinum_core::ui_document::UiElement::rect
pub fn rect(&self) -> [f32; 4]
Read `[x, y, width, height]`, defaulting to `[0, 0, 200, 40]`.
This authored rectangle is not the final responsive layout result.
Source: crates/platinum-core/src/ui_document/document.rs:64
platinum_core::ui_document::UiElement::set_rect
pub fn set_rect(&mut self, rect: [f32; 4])
Store rectangle attributes with two decimal places.
Validate the document before publishing; this setter alone accepts
values that can later fail validation.
Source: crates/platinum-core/src/ui_document/document.rs:75
platinum_core::ui_document::UiDocument
pub struct UiDocument
Renderer-independent authored UI data, with ordered elements and comments.
Version 1 supports bounded XML parsing and serde data interchange. Direct
serde decoding does not validate the result: bound input bytes first, then
call `validate`. This type performs no file IO, rendering or action dispatch.
Persist it separately from local focus, selection and window preferences.
Public data fields| Name | Type / declaration | Description |
|---|
| version | u32 | Authored format version; validation currently accepts only 1. |
| name | String | Human-readable document label, not a security or resource identity. |
| size | [f32; 2] | Positive finite reference canvas width and height. |
| stylesheet | String | Optional stylesheet dependency reference, resolved by the host. |
| elements | Vec<UiElement> | Ordered authored elements; parent IDs define their tree relationships. |
| comments | Vec<String> | Preserved inert XML comment text, subject to XML character constraints. |
Source: crates/platinum-core/src/ui_document/document.rs:88
platinum_core::ui_document::UiDocument::parse
pub fn parse(xml: &str) -> Result<Self, String>
Parse and validate `<ui>` XML with default budgets.
Returns a diagnostic for malformed XML, unsupported namespaces/version,
invalid widget data/IDs/hierarchy or exceeded budgets. No assets load.
Source: crates/platinum-core/src/ui_document/document.rs:106
platinum_core::ui_document::UiDocument::parse_with_limits
pub fn parse_with_limits(xml: &str, limits: UiLimits) -> Result<Self, String>
Parse XML after checking its byte budget, then validate authored data.
Every child element requires an exact integer `id`. Nested XML defines
the parent relation; text is collected from direct text children.
Source: crates/platinum-core/src/ui_document/document.rs:112
platinum_core::ui_document::UiDocument::validate
pub fn validate(&self) -> Result<(), String>
Check structure, widget vocabulary, text, dimensions and default budgets.
Use after constructing or deserializing data and before publishing edits.
Source: crates/platinum-core/src/ui_document/document.rs:201
platinum_core::ui_document::UiDocument::validate_with_limits
pub fn validate_with_limits(&self, limits: UiLimits) -> Result<(), String>
Validate against host-selected bounds, rejecting duplicate IDs, missing
parents, cycles, unsupported widgets and malformed numeric attributes.
Success describes valid data; host permissions remain a separate check.
Source: crates/platinum-core/src/ui_document/document.rs:207
platinum_core::ui_document::UiDocument::to_xml
pub fn to_xml(&self) -> Result<String, String>
Validate and serialize escaped XML within the default output byte budget.
This returns text only; the caller owns persistence and save status.
Source: crates/platinum-core/src/ui_document/document.rs:343
platinum_core::ui_document::UiDocument::next_id
pub fn next_id(&self) -> u64
Suggest one above the largest existing ID, saturating at `u64::MAX`.
This is not an allocation proof: exhaustion may return an existing ID.
Validated edit operations must reject collisions and exhaustion.
Source: crates/platinum-core/src/ui_document/document.rs:399
platinum_core::ui_document::UiDocument::dependencies
pub fn dependencies(&self) -> BTreeSet<String>
Collect declared stylesheet and `src`, `font`, `template`, and
`animation-asset` references for export dependency closure.
Returned strings are not path-normalized, read, trusted or authorized;
the host must resolve them against its admitted asset boundary.
Source: crates/platinum-core/src/ui_document/document.rs:412
platinum_core::ui_document::UiStylesheet
pub struct UiStylesheet
Bounded stylesheet data using kind, `.class` or `#integer-id` selectors.
Supported states are `:hover`, `:pressed`, `:focus`, `:disabled` and
`:selected`. This is the Platinum UI subset, not a browser CSS engine.
Parsing rejects unsupported selectors/properties; no URLs or scripts run.
Public data fields| Name | Type / declaration | Description |
|---|
| rules | Vec<(String, BTreeMap<String, String>)> | |
Source: crates/platinum-core/src/ui_document/document.rs:435
platinum_core::ui_document::UiStylesheet::validate
pub fn validate(&self) -> Result<(), String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:439
platinum_core::ui_document::UiStylesheet::parse
pub fn parse(css: &str) -> Result<Self, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:474
platinum_core::ui_document::UiStylesheet::parse_with_limits
pub fn parse_with_limits(css: &str, limits: UiLimits) -> Result<Self, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:477
platinum_core::ui_document::UiStylesheet::resolve
pub fn resolve(&self, e: &UiElement, state: &str) -> BTreeMap<String, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:575
platinum_core::ui_document::UiHistory
pub struct UiHistory
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:610
platinum_core::ui_document::UiHistory::commit
pub fn commit(&mut self, before: UiDocument, after: &UiDocument) -> Result<bool, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:615
platinum_core::ui_document::UiHistory::undo
pub fn undo(&mut self, doc: &mut UiDocument) -> Result<bool, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:628
platinum_core::ui_document::UiHistory::redo
pub fn redo(&mut self, doc: &mut UiDocument) -> Result<bool, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:641
platinum_core::ui_document::UiOverrides
pub struct UiOverrides(pub BTreeMap<UiElementId, BTreeMap<String, String>>)
Per-instance property overrides; source updates flow through all untouched properties.
Source: crates/platinum-core/src/ui_document/document.rs:658
platinum_core::ui_document::UiOverrides::instantiate
pub fn instantiate(&self, source: &UiDocument) -> Result<UiDocument, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:660
platinum_core::ui_document::UiOverrides::apply_to
pub fn apply_to(&mut self, source: &mut UiDocument) -> Result<(), String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:711
platinum_core::ui_document::UiOverrides::revert
pub fn revert(&mut self)
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:717
platinum_core::ui_document::UiInstanceAsset
pub struct UiInstanceAsset
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| version | u32 | |
| source | String | |
| overrides | UiOverrides | |
Source: crates/platinum-core/src/ui_document/document.rs:723
platinum_core::ui_document::UiInstanceAsset::parse_json
pub fn parse_json(json: &str) -> Result<Self, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:729
platinum_core::ui_document::UiInstanceAsset::validate
pub fn validate(&self) -> Result<(), String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:737
platinum_core::ui_document::UiInstanceAsset::instantiate
pub fn instantiate(&self, source: &UiDocument) -> Result<UiDocument, String>
Source references are inert names, not authorization to open a file.
Source: crates/platinum-core/src/ui_document/document.rs:748
platinum_core::ui_document::UiOverrides::between
pub fn between(source: &UiDocument, instance: &UiDocument) -> Result<Self, String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/document.rs:754
platinum_core::ui_document::UiClipboard
pub struct UiClipboard
Description not yet supplied in source. Signature and location are extracted evidence.
Public data fields| Name | Type / declaration | Description |
|---|
| version | u32 | |
| roots | Vec<u64> | |
| elements | Vec<UiElement> | |
Source: crates/platinum-core/src/ui_document/edit.rs:7
platinum_core::ui_document::UiClipboard::parse_json
pub fn parse_json(json: &str) -> Result<Self, String>
Wire callers must bound JSON before decoding, not only after allocation.
Source: crates/platinum-core/src/ui_document/edit.rs:15
platinum_core::ui_document::UiClipboard::validate
pub fn validate(&self) -> Result<(), String>
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/edit.rs:23
platinum_core::ui_document::UiAlignment
pub enum UiAlignment
Description not yet supplied in source. Signature and location are extracted evidence.
Source: crates/platinum-core/src/ui_document/edit.rs:62
platinum_core::ui_document::UiTransaction
pub struct UiTransaction
A validated local editing gesture with private before/preview snapshots.
Use one transaction for a drag or multi-step edit, then commit once to make
one undo entry. This is not a remote/collaborative transaction or durable save.
Source: crates/platinum-core/src/ui_document/transaction.rs:10
platinum_core::ui_document::UiTransaction::begin
pub fn begin(document: &UiDocument) -> Result<Self, String>
Validate and capture the current document without modifying it.
Source: crates/platinum-core/src/ui_document/transaction.rs:16
platinum_core::ui_document::UiTransaction::preview
pub fn preview(&self) -> &UiDocument
Read the latest valid candidate; canonical state remains unchanged.
Source: crates/platinum-core/src/ui_document/transaction.rs:24
platinum_core::ui_document::UiTransaction::edit
pub fn edit(
&mut self,
edit: impl FnOnce(&mut UiDocument) -> Result<(), String>,
) -> Result<(), String>
Each operation validates a temporary copy before publishing its preview.
Source: crates/platinum-core/src/ui_document/transaction.rs:28
platinum_core::ui_document::UiTransaction::cancel
pub fn cancel(self) -> UiDocument
Cancellation has no effect on canonical state or undo history.
Source: crates/platinum-core/src/ui_document/transaction.rs:39
platinum_core::ui_document::UiTransaction::commit
pub fn commit(
self,
document: &mut UiDocument,
history: &mut UiHistory,
) -> Result<bool, String>
Publish one undoable edit only if canonical state still equals `before`.
Returns whether content changed. A conflict or validation error leaves
canonical state unchanged; successful publication is not a disk save.
Source: crates/platinum-core/src/ui_document/transaction.rs:45