pub struct MockForgeServer { /* private fields */ }Expand description
A managed MockForge server instance for testing
Implementations§
Source§impl MockForgeServer
impl MockForgeServer
Sourcepub fn builder() -> MockForgeServerBuilder
pub fn builder() -> MockForgeServerBuilder
Create a new builder for MockForgeServer
Sourcepub async fn start(config: ServerConfig) -> Result<Self>
pub async fn start(config: ServerConfig) -> Result<Self>
Start a MockForge server with the given configuration
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the server is still running
Sourcepub async fn health_check(&self) -> Result<HealthStatus>
pub async fn health_check(&self) -> Result<HealthStatus>
Perform a health check
Sourcepub async fn load_workspace<P: AsRef<Path>>(
&self,
workspace_file: P,
) -> Result<()>
pub async fn load_workspace<P: AsRef<Path>>( &self, workspace_file: P, ) -> Result<()>
Load a workspace configuration from a file
Sourcepub async fn update_mock(&self, endpoint: &str, config: Value) -> Result<()>
pub async fn update_mock(&self, endpoint: &str, config: Value) -> Result<()>
Update mock configuration for a specific endpoint
Sourcepub async fn list_fixtures(&self) -> Result<Vec<String>>
pub async fn list_fixtures(&self) -> Result<Vec<String>>
List available fixtures
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockForgeServer
impl !RefUnwindSafe for MockForgeServer
impl Send for MockForgeServer
impl Sync for MockForgeServer
impl Unpin for MockForgeServer
impl !UnwindSafe for MockForgeServer
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