Skip to main content

FrameConfig

Struct FrameConfig 

Source
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: FrameSection

Console 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: ServerConfig

Embedded bus component configuration — liminal’s own config type, validated by liminal’s own validator.

§page_origins_derived: bool

Whether 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: bool

Whether 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

Source

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.

Source

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§

Source§

impl Debug for FrameConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more