pub struct Serving { /* private fields */ }Implementations§
Source§impl Serving
impl Serving
Sourcepub fn browser_sample(self, sample: BrowserSample) -> Self
pub fn browser_sample(self, sample: BrowserSample) -> Self
sofie::run reads it from SOFIE_BROWSER_SAMPLE.
Source§impl Serving
impl Serving
Sourcepub fn trusted_proxies(self, proxies: TrustedProxies) -> Self
pub fn trusted_proxies(self, proxies: TrustedProxies) -> Self
sofie::run reads them from SOFIE_TRUSTED_PROXIES.
Source§impl Serving
impl Serving
Sourcepub fn content_security<A: Area>(self, sources: ContentSecurity) -> Self
pub fn content_security<A: Area>(self, sources: ContentSecurity) -> Self
Replaces the area’s earlier sources; those given to content_security_all add to them.
pub fn content_security_all(self, sources: ContentSecurity) -> Self
Source§impl Serving
impl Serving
Sourcepub fn cors_origins(self, origins: CorsOrigins) -> Self
pub fn cors_origins(self, origins: CorsOrigins) -> Self
sofie::run reads them from SOFIE_CORS_ORIGINS; they add to each area’s App::cors origins.
Source§impl Serving
impl Serving
Sourcepub fn metrics_token(self, token: MetricsToken) -> Self
pub fn metrics_token(self, token: MetricsToken) -> Self
Without it /metrics does not exist; sofie::run reads SOFIE_METRICS_TOKEN.
Source§impl Serving
impl Serving
Sourcepub fn named(self, name: &'static str) -> Self
pub fn named(self, name: &'static str) -> Self
Names the app’s cookies, __Host-<name>-session (cookies do not separate by port), and
the AppName handlers take.
Sourcepub fn signing_keys(self, keys: SigningKeys) -> Self
pub fn signing_keys(self, keys: SigningKeys) -> Self
Without them, serving reads SOFIE_SIGNING_KEYS and refuses to start when it is missing.
Sourcepub fn max_connections(self, limit: NonZeroUsize) -> Self
pub fn max_connections(self, limit: NonZeroUsize) -> Self
Connections served at once, 4096 by default; keep it below ulimit -n.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Serving
impl !RefUnwindSafe for Serving
impl !UnwindSafe for Serving
impl Send for Serving
impl Sync for Serving
impl Unpin for Serving
impl UnsafeUnpin for Serving
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
Mutably borrows from an owned value. Read more