Trait tonic_build::Service[][src]

pub trait Service {
    type Comment: AsRef<str>;
    type Method: Method;

    const CODEC_PATH: &'static str;

    fn name(&self) -> &str;
fn package(&self) -> &str;
fn identifier(&self) -> &str;
fn methods(&self) -> &[Self::Method];
fn comment(&self) -> &[Self::Comment]; }

Service generation trait.

This trait can be implemented and consumed by client::generate and server::generate to allow any codegen module to generate service abstractions.

Associated Types

type Comment: AsRef<str>[src]

Comment type.

type Method: Method[src]

Method type.

Loading content...

Associated Constants

const CODEC_PATH: &'static str[src]

Path to the codec.

Loading content...

Required methods

fn name(&self) -> &str[src]

Name of service.

fn package(&self) -> &str[src]

Package name of service.

fn identifier(&self) -> &str[src]

Identifier used to generate type name.

fn methods(&self) -> &[Self::Method][src]

Methods provided by service.

fn comment(&self) -> &[Self::Comment][src]

Get comments about this item.

Loading content...

Implementations on Foreign Types

impl Service for Service[src]

type Method = Method

type Comment = String

Loading content...

Implementors

Loading content...