GraphService

Trait GraphService 

Source
pub trait GraphService: Send {
    // Required methods
    fn authenticate(
        &self,
        arg_username: &Vec<u8>,
        arg_password: &Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthenticateError>> + Send + 'static>>;
    fn signout(
        &self,
        arg_sessionId: i64,
    ) -> Pin<Box<dyn Future<Output = Result<(), SignoutError>> + Send + 'static>>;
    fn execute(
        &self,
        arg_sessionId: i64,
        arg_stmt: &Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<ExecutionResponse, ExecuteError>> + Send + 'static>>;
    fn executeJson(
        &self,
        arg_sessionId: i64,
        arg_stmt: &Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ExecuteJsonError>> + Send + 'static>>;
}

Required Methods§

Source

fn authenticate( &self, arg_username: &Vec<u8>, arg_password: &Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthenticateError>> + Send + 'static>>

Source

fn signout( &self, arg_sessionId: i64, ) -> Pin<Box<dyn Future<Output = Result<(), SignoutError>> + Send + 'static>>

Source

fn execute( &self, arg_sessionId: i64, arg_stmt: &Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<ExecutionResponse, ExecuteError>> + Send + 'static>>

Source

fn executeJson( &self, arg_sessionId: i64, arg_stmt: &Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ExecuteJsonError>> + Send + 'static>>

Implementations§

Source§

impl dyn GraphService

To be called by user directly setting up a client. Avoids needing ClientFactory trait in scope, avoids unidiomatic make_Trait name.

use bgs::client::BuckGraphService;

let protocol = BinaryProtocol::new();
let transport = HttpClient::new();
let client = BuckGraphService::new(protocol, transport);
Source

pub fn new<P, T>( protocol: P, transport: T, ) -> Arc<impl GraphService + Send + 'static>
where P: Protocol<Frame = T>, T: Transport,

Source§

impl dyn GraphService

Source

pub fn mock<'mock>() -> GraphService<'mock>

Implementors§

Source§

impl<'a, T> GraphService for T
where T: AsRef<dyn GraphService + 'a> + Send,

Source§

impl<'mock> GraphService for GraphService<'mock>

Source§

impl<P, T> GraphService for GraphServiceImpl<P, T>