pub struct Builder { /* private fields */ }Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn data_dir(self, path: impl Into<PathBuf>) -> Self
pub fn service_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn service_mode(self, mode: ServiceMode) -> Self
pub fn http(self, enabled: bool) -> Self
pub fn mdns(self, enabled: bool) -> Self
pub fn dns<F>(self, configure: F) -> Self
pub fn dns_enabled(self, enabled: bool) -> Self
pub fn dns_auto_start(self, enabled: bool) -> Self
pub fn health(self, enabled: bool) -> Self
pub fn health_auto_start(self, enabled: bool) -> Self
pub fn certmesh(self, enabled: bool) -> Self
pub fn proxy(self, enabled: bool) -> Self
pub fn proxy_auto_start(self, enabled: bool) -> Self
pub fn udp(self, enabled: bool) -> Self
Sourcepub fn runtime(self, kind: RuntimeBackendKind) -> Self
pub fn runtime(self, kind: RuntimeBackendKind) -> Self
Enable the runtime adapter with the specified backend kind.
Runtime is opt-in for embedded (unlike daemon where capabilities are enabled by default).
Sourcepub fn runtime_auto(self) -> Self
pub fn runtime_auto(self) -> Self
Enable the runtime adapter with auto-detection.
pub fn http_port(self, port: u16) -> Self
pub fn dashboard(self, enabled: bool) -> Self
pub fn api_docs(self, enabled: bool) -> Self
pub fn mdns_browser(self, enabled: bool) -> Self
pub fn announce_http(self, enabled: bool) -> Self
pub fn events<F>(self, handler: F) -> Self
Sourcepub fn extra_firewall_ports(self, ports: Vec<FirewallPort>) -> Self
pub fn extra_firewall_ports(self, ports: Vec<FirewallPort>) -> Self
Register additional firewall ports that the host application needs
opened (e.g. Moss discovery UDP, HTTP API). These are merged with
the ports from enabled Koi capabilities when ensure_firewall_rules
is called.
Sourcepub fn ensure_firewall_rules(self, prefix: &str) -> Self
pub fn ensure_firewall_rules(self, prefix: &str) -> Self
Best-effort ensure that Windows Firewall inbound-allow rules exist for every port required by the enabled capabilities plus any extra ports registered by the host application.
- Idempotent — safe to call on every startup.
- Non-fatal — logs warnings but never fails the build.
- No-op on non-Windows platforms.
prefix is used in the firewall rule display-names
(e.g. "Zen Garden" → "Zen Garden mDNS (UDP 5353)").
pub fn build(self) -> Result<KoiEmbedded>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Builder
impl !UnwindSafe for Builder
impl Freeze for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
Converts
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>
Converts
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 more