Struct stubr::Stubr[][src]

pub struct Stubr { /* fields omitted */ }

Allows running a Wiremock mock server from Wiremock stubs. Delegates runtime to wiremock-rs.

Implementations

impl Stubr[src]

pub async fn start<T>(stubs: T) -> Self where
    T: Into<PathBuf>, 
[src]

Runs a mock server. The server is unbinded when the instance is dropped. Use this in a test context.

  • stubs - folder or file containing the stubs

pub fn start_blocking<T>(stubs: T) -> Self where
    T: Into<PathBuf>, 
[src]

Runs a mock server in a blocking way. The server is unbinded when the instance is dropped. Use this in a test context.

  • stubs - folder or file containing the stubs

pub async fn start_with<T>(stubs: T, config: Config) -> Self where
    T: Into<PathBuf>, 
[src]

Runs a mock server with some configuration. The server is unbinded when the instance is dropped. Use this in a test context.

  • stubs - folder or file containing the stubs
  • config - global server configuration

pub fn start_blocking_with<T>(stubs: T, config: Config) -> Self where
    T: Into<PathBuf>, 
[src]

Runs a mock server in a blocking way with some configuration. The server is unbinded when the instance is dropped. Use this in a test context.

  • stubs - folder or file containing the stubs
  • config - global server configuration

pub fn uri(&self) -> String[src]

Get running server address

Auto Trait Implementations

impl !RefUnwindSafe for Stubr

impl Send for Stubr

impl Sync for Stubr

impl Unpin for Stubr

impl !UnwindSafe for Stubr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,