pub struct OfflineNetwork { /* private fields */ }Expand description
Answers only what it was given, and refuses everything else.
Refusing rather than returning an empty 200: a tool that got an empty page for a url nobody scripted would report that the page was empty, which is a different and much harder failure to notice than “nothing answers here”.
Implementations§
Trait Implementations§
Source§impl Clone for OfflineNetwork
impl Clone for OfflineNetwork
Source§impl Default for OfflineNetwork
impl Default for OfflineNetwork
Source§impl Network for OfflineNetwork
impl Network for OfflineNetwork
Source§fn send<'life0, 'async_trait>(
&'life0 self,
req: HttpRequest,
_origin: Origin,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
req: HttpRequest,
_origin: Origin,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send, and read the whole body.
Auto Trait Implementations§
impl Forget for OfflineNetwork
impl Freeze for OfflineNetwork
impl Move for OfflineNetwork
impl RefUnwindSafe for OfflineNetwork
impl Send for OfflineNetwork
impl Sync for OfflineNetwork
impl Unpin for OfflineNetwork
impl UnsafeUnpin for OfflineNetwork
impl UnwindSafe for OfflineNetwork
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