[−][src]Struct httpmock::ServerAdapter
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]
&self,
mock: &MockDefinition
) -> Result<MockIdentification, String>
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
Auto Trait Implementations
impl Send for ServerAdapter
impl Sync for ServerAdapter
impl Unpin for ServerAdapter
impl UnwindSafe for ServerAdapter
impl RefUnwindSafe for ServerAdapter
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,