[][src]Struct httpmock::ServerAdapter

pub struct ServerAdapter { /* fields omitted */ }

This adapter allows to access the servers management functionality.

You can create an adapter by calling ServerAdapter::from_env to create a new instance. You should never actually need to use this adapter, but you certainly can, if you absolutely need to.

Methods

impl ServerAdapter[src]

pub fn from_env() -> ServerAdapter[src]

pub fn server_port(&self) -> u16[src]

pub fn server_host(&self) -> &str[src]

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

pub fn create_mock(
    &self,
    mock: &MockDefinition
) -> Result<MockIdentification, String>
[src]

pub fn fetch_mock(&self, mock_id: usize) -> Result<ActiveMock, String>[src]

pub fn delete_mock(&self, mock_id: usize) -> Result<(), String>[src]

pub fn delete_all_mocks(&self) -> Result<(), String>[src]

Trait Implementations

impl Debug for ServerAdapter[src]

Auto Trait Implementations

Blanket Implementations

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

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

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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