#[cfg(feature = "webserver")]
pub(super) use crate::webserver::OutboundCall;
#[cfg(not(feature = "webserver"))]
pub(super) struct OutboundCall;
#[cfg(not(feature = "webserver"))]
impl OutboundCall {
pub(super) const fn start(_target: &'static str, _route: &'static str) -> Self {
Self
}
pub(super) const fn request_bytes(self, _bytes: u64) -> Self {
self
}
pub(super) const fn finish(self, _status: Option<u16>, _response_bytes: Option<u64>) {}
}
impl OutboundCall {
pub(super) fn finish_with(self, outcome: &reqwest::Result<reqwest::Response>) {
match outcome {
Ok(response) => {
self.finish(Some(response.status().as_u16()), response.content_length());
}
Err(_) => self.finish(None, None),
}
}
}