pub struct ServerConfigBuilder { /* private fields */ }Expand description
Builder for ServerConfig
Implementations§
Source§impl ServerConfigBuilder
impl ServerConfigBuilder
Sourcepub fn admin_port(self, port: u16) -> Self
pub fn admin_port(self, port: u16) -> Self
Set admin UI port
Sourcepub fn metrics_port(self, port: u16) -> Self
pub fn metrics_port(self, port: u16) -> Self
Set metrics port
Sourcepub fn workspace_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn workspace_dir<P: Into<PathBuf>>(self, path: P) -> Self
Set workspace directory
Sourcepub fn enable_admin(self, enable: bool) -> Self
pub fn enable_admin(self, enable: bool) -> Self
Enable admin UI
Sourcepub fn enable_metrics(self, enable: bool) -> Self
pub fn enable_metrics(self, enable: bool) -> Self
Enable metrics endpoint
Sourcepub fn extra_args<I, S>(self, args: I) -> Self
pub fn extra_args<I, S>(self, args: I) -> Self
Add multiple extra CLI arguments
Sourcepub fn health_timeout(self, timeout: Duration) -> Self
pub fn health_timeout(self, timeout: Duration) -> Self
Set health check timeout
Sourcepub fn health_interval(self, interval: Duration) -> Self
pub fn health_interval(self, interval: Duration) -> Self
Set health check interval
Sourcepub fn working_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn working_dir<P: Into<PathBuf>>(self, path: P) -> Self
Set working directory
Sourcepub fn binary_path<P: Into<PathBuf>>(self, path: P) -> Self
pub fn binary_path<P: Into<PathBuf>>(self, path: P) -> Self
Set path to mockforge binary
Sourcepub fn build(self) -> ServerConfig
pub fn build(self) -> ServerConfig
Build the ServerConfig
Trait Implementations§
Source§impl Debug for ServerConfigBuilder
impl Debug for ServerConfigBuilder
Source§impl Default for ServerConfigBuilder
impl Default for ServerConfigBuilder
Source§fn default() -> ServerConfigBuilder
fn default() -> ServerConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServerConfigBuilder
impl RefUnwindSafe for ServerConfigBuilder
impl Send for ServerConfigBuilder
impl Sync for ServerConfigBuilder
impl Unpin for ServerConfigBuilder
impl UnwindSafe for ServerConfigBuilder
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
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