[][src]Trait ftml_rpc::Api

pub trait Api: Clone {
    type ProtocolFut: Future<Output = String>;
    type PingFut: Future<Output = String>;
    type TimeFut: Future<Output = f64>;
    type PrefilterFut: Future<Output = Result<String>>;
    type ParseFut: Future<Output = Result<Value>>;
    type RenderFut: Future<Output = Result<HtmlOutput>>;
    fn protocol(self, context: Context) -> Self::ProtocolFut;
fn ping(self, context: Context) -> Self::PingFut;
fn time(self, context: Context) -> Self::TimeFut;
fn prefilter(self, context: Context, input: String) -> Self::PrefilterFut;
fn parse(self, context: Context, input: String) -> Self::ParseFut;
fn render(
        self,
        context: Context,
        page_info: PageInfoOwned,
        input: String
    ) -> Self::RenderFut; fn serve(self) -> ServeFtml<Self> { ... } }

Associated Types

type ProtocolFut: Future<Output = String>

The response future returned by protocol.

type PingFut: Future<Output = String>

The response future returned by ping.

type TimeFut: Future<Output = f64>

The response future returned by time.

type PrefilterFut: Future<Output = Result<String>>

The response future returned by prefilter.

type ParseFut: Future<Output = Result<Value>>

The response future returned by parse.

type RenderFut: Future<Output = Result<HtmlOutput>>

The response future returned by render.

Loading content...

Required methods

fn protocol(self, context: Context) -> Self::ProtocolFut

fn ping(self, context: Context) -> Self::PingFut

fn time(self, context: Context) -> Self::TimeFut

fn prefilter(self, context: Context, input: String) -> Self::PrefilterFut

fn parse(self, context: Context, input: String) -> Self::ParseFut

fn render(
    self,
    context: Context,
    page_info: PageInfoOwned,
    input: String
) -> Self::RenderFut

Loading content...

Provided methods

fn serve(self) -> ServeFtml<Self>

Returns a serving function to use with tarpc::server::Server.

Loading content...

Implementors

Loading content...