pub fn new_with_engine(
        engine: Engine<RequestCtx>,
        metadata: Option<HashMap<String, String>>,
    ) -> Client<RequestCtx> {
        trace!("Client::new_with_engine called");
        Client::<RequestCtx>::Local {
            engine: Box::new(engine),
            metadata,
        }
    }
/// Takes a Warpgrapher engine and returns a new ['Client'] initialized to query that engine.
/// The type parameter is the [`RequestContext`] used by the engine.
///
/// [`Client`]: ./enum.Client.html
/// [`RequestContext`]: ../engine/context/trait.RequestContext.html
///
/// # Examples
///
/// ```rust,no_run
/// # use tokio::main;
/// # use warpgrapher::{Client, Configuration, Engine};
/// # use warpgrapher::engine::database::DatabaseEndpoint;
/// # use warpgrapher::engine::database::no_database::NoDatabaseEndpoint;
///
/// # #[tokio::main]
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// let c = Configuration::new(1, Vec::new(), Vec::new());
/// let endpoint = NoDatabaseEndpoint {};
/// let engine = Engine::new(c, endpoint.pool().await?).build()?;
///
/// let mut client = Client::<()>::new_with_engine(engine, None);
/// # Ok(())
/// # }
/// ```
Takes a Warpgrapher engine and returns a new ['Client'] initialized to query that engine.
The type parameter is the [`RequestContext`] used by the engine.


Takes a Warpgrapher engine and returns a new [ ' Client ' ] initialized to query that engine . The type parameter is the [ ` RequestContext ` ] used by the engine .
pub fn new_with_engine(
        engine: Engine<RequestCtx>,
        metadata: Option<HashMap<String, String>>,
    ) -> Client<RequestCtx> {
        trace!("Client::new_with_engine called");
        Client::<RequestCtx>::Local {
            engine: Box::new(engine),
            metadata,
        }
    }
pub fn new_with_engine ( engine : Engine < RequestCtx > , metadata : Option < HashMap < String , String > > , ) -> Client < RequestCtx > { trace ! ( " " ) ; Client :: < RequestCtx > :: Local { engine : Box :: new ( engine ) , metadata , } }
Takes a Warpgrapher engine and returns a new ['Client'] initialized to query that engine.
Takes a Warpgrapher engine and returns a new [ ' Client ' ] initialized to query that engine .
engine
Engine<RequestCtx>
metadata
Option<HashMap<String, String>>
engine
Engine<RequestCtx>
metadata
Option<HashMap<String, String>>
examples
None
use tokio::main;
None
use warpgrapher::{client, configuration, engine};
None
use warpgrapher::engine::database::databaseendpoint;
None
use warpgrapher::engine::database::no_database::nodatabaseendpoint;
None
#[tokio::main]
None
async fn main() -> result<(), box<dyn std::error::error>> {
let c = Configuration::new(1, Vec::new(), Vec::new());
let endpoint = NoDatabaseEndpoint {};
let engine = Engine::new(c, endpoint.pool().await?).build()?.

let mut client = Client::<()>::new_with_engine(engine, None).
let c = Configuration :: new ( 1 Vec :: new () Vec :: new () ) ; let endpoint = NoDatabaseEndpoint {} ; let engine = Engine :: new ( c endpoint . pool () . await? ) . build () ? . let mut client = Client :: < () > :: new_with_engine ( engine None ) .
ok(())
None
}
None