pub struct ServerOptions {
pub bind_addr: String,
pub max_body_bytes: usize,
pub read_timeout_ms: u64,
pub write_timeout_ms: u64,
pub max_scan_limit: usize,
pub surface: ServerSurface,
pub transport_readiness: TransportReadiness,
pub websocket_allowed_origins: Vec<String>,
pub ui_dir: Option<PathBuf>,
}Fields§
§bind_addr: String§max_body_bytes: usize§read_timeout_ms: u64§write_timeout_ms: u64§max_scan_limit: usize§surface: ServerSurfaceWhich subset of paths this listener serves. Defaults to
Public. Set to AdminOnly / MetricsOnly for dedicated
admin / scrape ports (PLAN.md Phase 6.2).
transport_readiness: TransportReadiness§websocket_allowed_origins: Vec<String>Allowed Origin values for the RedWire-over-WSS browser endpoint
(issue #935, ADR 0036). WebSocket is not covered by CORS, so the
upgrade is gated on an explicit allowlist to block Cross-Site
WebSocket Hijacking. Default-deny: empty means the /redwire
route is not mounted at all — operators opt in by configuring at
least one origin. Matched exactly (scheme+host+port), e.g.
https://app.example.com.
ui_dir: Option<PathBuf>red server --ui (issue #1047, ADR 0051). When Some, this
listener also serves the resolved red-ui bundle from this directory
as inert static assets (/ → index.html), alongside the existing
API. The assets carry no credential, so exposing them is safe by
construction — auth lives on the RedWire data endpoint, not the
asset path. Network reach is governed entirely by bind_addr
(default localhost), so this never widens reach on its own.
None (the default) leaves the listener API-only.
Trait Implementations§
Source§impl Clone for ServerOptions
impl Clone for ServerOptions
Source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerOptions
impl Debug for ServerOptions
Source§impl Default for ServerOptions
impl Default for ServerOptions
Source§fn default() -> ServerOptions
fn default() -> ServerOptions
Auto Trait Implementations§
impl Forget for ServerOptions
impl Freeze for ServerOptionswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TransportListenerState>: Freeze,
PhantomData<TransportListenerFailure>: Freeze,
PhantomData<String>: Freeze,
impl Move for ServerOptions
impl RefUnwindSafe for ServerOptions
impl Send for ServerOptionswhere
RawVecInner: Send,
impl Sync for ServerOptionswhere
RawVecInner: Sync,
impl Unpin for ServerOptions
impl UnsafeUnpin for ServerOptionswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TransportListenerState>: UnsafeUnpin,
PhantomData<TransportListenerFailure>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ServerOptionswhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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