Trait nebula_fbthrift_raftex_v2::client::RaftexService[][src]

pub trait RaftexService: Send {
    fn askForVote(
        &self,
        arg_req: &AskForVoteRequest
    ) -> Pin<Box<dyn Future<Output = Result<AskForVoteResponse, AskForVoteError>> + Send + 'static>>;
fn appendLog(
        &self,
        arg_req: &AppendLogRequest
    ) -> Pin<Box<dyn Future<Output = Result<AppendLogResponse, AppendLogError>> + Send + 'static>>;
fn sendSnapshot(
        &self,
        arg_req: &SendSnapshotRequest
    ) -> Pin<Box<dyn Future<Output = Result<SendSnapshotResponse, SendSnapshotError>> + Send + 'static>>; }

Required methods

fn askForVote(
    &self,
    arg_req: &AskForVoteRequest
) -> Pin<Box<dyn Future<Output = Result<AskForVoteResponse, AskForVoteError>> + Send + 'static>>
[src]

fn appendLog(
    &self,
    arg_req: &AppendLogRequest
) -> Pin<Box<dyn Future<Output = Result<AppendLogResponse, AppendLogError>> + Send + 'static>>
[src]

fn sendSnapshot(
    &self,
    arg_req: &SendSnapshotRequest
) -> Pin<Box<dyn Future<Output = Result<SendSnapshotResponse, SendSnapshotError>> + Send + 'static>>
[src]

Loading content...

Implementations

impl dyn RaftexService[src]

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);

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

impl dyn RaftexService[src]

pub fn mock<'mock>() -> RaftexService<'mock>[src]

Implementors

impl<'a, T> RaftexService for T where
    T: AsRef<dyn RaftexService + 'a>,
    T: Send
[src]

impl<'mock> RaftexService for RaftexService<'mock>[src]

impl<P, T> RaftexService for RaftexServiceImpl<P, T> where
    P: Protocol,
    T: Transport,
    P::Frame: Framing<DecBuf = FramingDecoded<T>>,
    ProtocolEncoded<P>: BufMutExt<Final = FramingEncodedFinal<T>>, 
[src]

Loading content...