spire_core/backend/
noop.rs1use std::future::{Future, ready};
2
3use crate::Result;
4use crate::backend::{Backend, Client};
5use crate::request::{Request, Response};
6
7#[derive(Debug, Clone, Copy, Default)]
12pub struct Noop;
13
14impl Backend for Noop {
15 type Client = Self;
16
17 fn connect(&self) -> impl Future<Output = Result<Self::Client>> + Send {
18 ready(Ok(Self))
19 }
20}
21
22impl Client for Noop {
23 fn fetch(self, _request: Request) -> impl Future<Output = Result<Response>> + Send {
24 ready(Ok(Response::default()))
25 }
26}