pub trait SurfaceSource: Send + Sync {
// Required methods
fn current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SurfaceDocument>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn built(&self) -> Arc<SurfaceDocument> ⓘ;
// Provided method
fn rendered(&self, admin: bool) -> Option<&RenderedSurface> { ... }
}Expand description
Where the current surface comes from (issue #76). With no sidecar
mounted this is the document composed at build; with sidecars, each
call fetches every mounted sidecar’s /__surface (public part) and
merges it in, so a sidecar redeploy is seen on the next request
(ADR 0009). An unreachable sidecar contributes nothing and is logged.
Required Methods§
Sourcefn current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SurfaceDocument>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SurfaceDocument>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
The full document: admin actions of in-process modules included, sidecar modules appended.
Sourcefn built(&self) -> Arc<SurfaceDocument> ⓘ
fn built(&self) -> Arc<SurfaceDocument> ⓘ
The build-time document alone, for checks that must not wait on a
network (a UiSpec validated against what the artifact ships).
Provided Methods§
Sourcefn rendered(&self, admin: bool) -> Option<&RenderedSurface>
fn rendered(&self, admin: bool) -> Option<&RenderedSurface>
A prerendered build-time document (admin variant when admin),
if the source keeps one; None means render the current document.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".