pub struct PublishedObject<T: WipObject> { /* private fields */ }Expand description
A host-private object instance combined with an explicit ordered interface set.
The instance is owned by this value and can therefore be request-scoped. No global object registry is required. Worldspace paths remain provider context and are deliberately absent from the publication.
Implementations§
Source§impl<T: WipObject> PublishedObject<T>
impl<T: WipObject> PublishedObject<T>
Sourcepub fn bind_scope(self, current: ScopeObservation) -> Self
pub fn bind_scope(self, current: ScopeObservation) -> Self
Attaches a current scope snapshot inside the provider’s atomic boundary.
Never populate this from a stale prelookup. Target, scope association, Descriptor and backend handles must remain coherent through dispatch and commit. A later same-path binding replaces the earlier snapshot.
Sourcepub fn expose<D>(
self,
interface: &RegisteredInterface<D>,
) -> Result<Self, PublicationError>where
D: InterfaceImplementation<T>,
pub fn expose<D>(
self,
interface: &RegisteredInterface<D>,
) -> Result<Self, PublicationError>where
D: InterfaceImplementation<T>,
Explicitly exposes a registered generated interface in insertion order.
The InterfaceImplementation<T> bound is generated only when T
implements the corresponding Rust interface trait. Duplicate scoped
references are rejected.
Sourcepub fn project(
self,
interfaces: &[InterfaceRef],
visible: impl Fn(&InterfaceRef, &str) -> bool,
) -> Result<Self, PublicationError>
pub fn project( self, interfaces: &[InterfaceRef], visible: impl Fn(&InterfaceRef, &str) -> bool, ) -> Result<Self, PublicationError>
Restricts a publication to an ordered interface/operation view.
This never adds implementations or changes codecs. The provider must use
the identical operation predicate for fetch_interface, and keep the
effective view stable for the lifetime of its references. Filtered
descriptors are scoped to that view, not mutations of registry artifacts.
Sourcepub fn implementation(&self) -> &T
pub fn implementation(&self) -> &T
Returns the host-private implementation without projecting its fields.
Sourcepub fn protocol_object(&self) -> Object
pub fn protocol_object(&self) -> Object
Builds metadata from the explicit exposure set in insertion order.
This path-free projection is useful while composing a publication, but is
not proof that its scopes are currently published. Use
ObjectProvider::observe_object for a validated current observation, or
Self::protocol_object_at inside a provider’s coherent boundary.
The metadata contains no path, children, descriptor, backend handle,
credential, or provider resolution state.
Sourcepub fn protocol_object_at(&self, path: &str) -> Result<Object, CallError>
pub fn protocol_object_at(&self, path: &str) -> Result<Object, CallError>
Validates a current Object observation inside the provider’s boundary.
All exposed interfaces must have compatible, live scope associations. The provider must still establish those associations atomically; this method cannot verify backend lifetime assertions or lock external writers.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the publication and returns its host-private implementation.