Skip to main content

Crate wip_host

Crate wip_host 

Source
Expand description

Host-side publication and operation dispatch for Web Interface Protocol objects.

§Responsibility boundaries

InterfaceRegistry::register validates and freezes a generated interface descriptor at an explicit scope and local name, and leaves that reference outside the descriptor. PublishedObject::expose explicitly combines a request-scoped Rust object with a registered interface; its InterfaceImplementation bound proves at compile time that the object implements the interface. Implementing a Rust trait alone never publishes it, and a publication with no interfaces is valid.

ObjectProvider::call_operation resolves target.path exactly once and keeps the resulting object, current scope Object association/ref, interface membership, descriptor, implementation, and backend target fixed within the provider’s ObjectProvider::with_object callback. Dispatch is qualified by (interface reference, operation name). The same frozen operation declaration validates both arguments and results.

A provider is responsible for entering a backend transaction, lock, stable-handle scope, or conditional-update primitive before invoking the operation callback and retaining it through commit or rollback. The typed OperationAttempt boundary distinguishes pre-dispatch rejection from started execution. Only an implementation-supplied non-commit guarantee or a provider-confirmed rollback allows a post-invocation failure to become Internal or ResourceLimitExceeded; every other outcome is OperationOutcomeUnknown. Mutable operations must make object-validator comparison and backend commit atomic, and the validator returned after dispatch must describe the state that becomes committed.

Re-exports§

pub use wip_protocol;

Structs§

CallError
A dispatch failure with a stable kind and bounded non-normative diagnostic.
CallRequest
Transport-independent request to execute one operation.
CallResult
Successful operation response.
CancellationToken
Runtime-neutral cooperative cancellation signal.
ExecutionContext
Execution controls propagated through object resolution and operation dispatch.
HostError
A typed host/runtime failure, kept separate from the operation’s application return type.
InterfaceObservation
One atomic observation of an interface reference, descriptor, and validator.
InterfaceRef
Structured client-facing reference to a scoped Interface publication.
InterfaceRegistry
Registry of frozen definition artifacts and explicitly scoped registrations.
InterfaceTarget
Interface portion of an operation target.
OperationFailure
A post-invocation failure awaiting final provider effect disposition.
PublishedObject
A host-private object instance combined with an explicit ordered interface set.
RegisteredInterface
A typed registration token for a generated interface definition.
Scope
One publication lifetime of the Object at a canonical scope path.
ScopeObservation
Provider-attested current scope Object association.
Target
Object portion of an operation target.
Validator
Opaque bytes used as a conditional execution precondition.

Enums§

CallErrorKind
Stable Host dispatch failure kind.
EffectGuarantee
Whether an operation failure proves that no effects were committed.
HostErrorKind
Host/runtime failure category used when effects are known not to be committed.
OperationAttempt
Dispatch progress returned to the provider’s atomic execution boundary.
ProviderResult
Result of one provider resolution or execution boundary.
PublicationError
Failure to construct an explicit object publication.
RegistrationError
Failure while registering a generated interface Definition.

Traits§

InterfaceDefinition
Static metadata implemented by every companion generated by interface.
InterfaceImplementation
Typed dispatch implemented by every generated interface companion.
ObjectProvider
A request-scoped Worldspace resolver and execution boundary.
WipObject
Public metadata and conditional-execution policy for a host-private object.