pub struct FrameConfig {
pub frame: FrameSection,
pub document: Option<DocumentSection>,
pub bus: ServerConfig,
pub page_origins_derived: bool,
pub ports_explicit: bool,
}Expand description
The parsed frame.toml: the console section plus the embedded bus
section (liminal’s own config type).
Fields§
§frame: FrameSectionConsole HTTP server configuration.
document: Option<DocumentSection>The optional [document] binding: when present, the host boots the
document service (IRIDIUM-A3 R11) against the embedded bus.
bus: ServerConfigEmbedded bus component configuration — liminal’s own config type, validated by liminal’s own validator.
page_origins_derived: boolWhether the embedded bus’s [bus.websocket].allowed_origins list is
DERIVED (the operator did not state it) rather than stated verbatim.
When true, Self::finalize_page_origins fills the list from the
page server’s REAL bound address once it is known
(crate::page::PageServer::resolve) — both the 127.0.0.1 and the
localhost spelling — so the served page’s own origin is always
allow-listed. When false the operator’s explicit list is LAW and is
never touched (2026-07-22 portless ruling: stated config remains
authoritative, no silent fallback).
ports_explicit: boolWhether the whole port topology is stated verbatim by the operator:
[frame].bind is present AND [bus.websocket].allowed_origins is
stated. Only a fully-stated topology has any port coherence to check
(frame check); a derived/portless one is coherent by construction.
Implementations§
Source§impl FrameConfig
impl FrameConfig
Sourcepub fn load(path: &Path) -> Result<Self, HostError>
pub fn load(path: &Path) -> Result<Self, HostError>
Loads and fully validates frame.toml.
Accepts the embedded bus section as [bus] (primary), [liminal]
(deprecated alias — parsed with a loud tracing::warn! naming [bus];
never a silent fallback), or ENTIRELY ABSENT (the portless scaffold,
2026-07-22 ruling): a missing [bus] is synthesized wholesale by
frame-host (synthesize_portless_bus) with OS-assigned internal
ports and the single channel taken from [frame].channel. An
operator-authored bus runs liminal’s own validation (channel
schema_ref paths resolve relative to the config file’s directory,
exactly as standalone liminal resolves them); a synthesized one is
correct by construction and skips only liminal’s port-non-zero check
(the :0 sentinels are intentional). Either way frame-host then
refuses any bus shape the embedded frame server does not faithfully
orchestrate.
§Errors
Returns a typed failure for an unreadable file, malformed TOML, both
section spellings present at once, a portless config with no
[frame].channel to name its bus channel, an operator bus section
liminal’s validator rejects, or an embedded-mode shape refusal.
Sourcepub fn finalize_page_origins(&mut self, page_addr: SocketAddr)
pub fn finalize_page_origins(&mut self, page_addr: SocketAddr)
Fills the embedded bus’s [bus.websocket].allowed_origins from the page
server’s REAL bound address once it is known, but ONLY when the operator
did not state the list (Self::page_origins_derived).
The served page’s origin is http://<page-addr>; the browser presents
it on every WebSocket upgrade and liminal’s acceptor checks it against
this allow-list (fail-closed when empty). Both the 127.0.0.1 and the
localhost spelling of the bound port are added — the exact fix for a
real deployment that died on a 127-vs-localhost Origin mismatch when
only one spelling was allow-listed. Call this AFTER
crate::page::PageServer::resolve and BEFORE the bus binds
(crate::application::Application::boot); a stated list is LAW and is
left untouched.
Idempotent and side-effect-free when the list was stated: the operator’s bytes reach liminal’s acceptor exactly as written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameConfig
impl RefUnwindSafe for FrameConfig
impl Send for FrameConfig
impl Sync for FrameConfig
impl Unpin for FrameConfig
impl UnsafeUnpin for FrameConfig
impl UnwindSafe for FrameConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request