pub struct MockForgeServerBuilder { /* private fields */ }Expand description
Builder for MockForgeServer
Implementations§
Source§impl MockForgeServerBuilder
impl MockForgeServerBuilder
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(self, path: impl Into<PathBuf>) -> Self
pub fn workspace_dir(self, path: impl Into<PathBuf>) -> 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 health_timeout(self, timeout: Duration) -> Self
pub fn health_timeout(self, timeout: Duration) -> Self
Set health check timeout
Sourcepub fn working_dir(self, path: impl Into<PathBuf>) -> Self
pub fn working_dir(self, path: impl Into<PathBuf>) -> Self
Set working directory
Sourcepub fn env_var(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env_var(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add environment variable
Sourcepub fn binary_path(self, path: impl Into<PathBuf>) -> Self
pub fn binary_path(self, path: impl Into<PathBuf>) -> Self
Set path to mockforge binary
Sourcepub async fn build(self) -> Result<MockForgeServer>
pub async fn build(self) -> Result<MockForgeServer>
Build and start the MockForge server
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockForgeServerBuilder
impl RefUnwindSafe for MockForgeServerBuilder
impl Send for MockForgeServerBuilder
impl Sync for MockForgeServerBuilder
impl Unpin for MockForgeServerBuilder
impl UnwindSafe for MockForgeServerBuilder
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