Trait reproto_core::translator::Translator [] [src]

pub trait Translator {
    type Source: 'static + Flavor;
    type Target: 'static + Flavor;
    fn translate_package(
        &self,
        _: <Self::Source as Flavor>::Package
    ) -> Result<<Self::Target as Flavor>::Package>;
fn translate_type(
        &self,
        diag: &mut Diagnostics,
        _: <Self::Source as Flavor>::Type
    ) -> Result<<Self::Target as Flavor>::Type>;
fn translate_field(
        &self,
        diag: &mut Diagnostics,
        _: <Self::Source as Flavor>::Field
    ) -> Result<<Self::Target as Flavor>::Field>;
fn translate_endpoint(
        &self,
        diag: &mut Diagnostics,
        _: <Self::Source as Flavor>::Endpoint
    ) -> Result<<Self::Target as Flavor>::Endpoint>;
fn translate_local_name(
        &self,
        diag: &mut Diagnostics,
        reg: RpReg,
        name: <Self::Source as Flavor>::Name
    ) -> Result<<Self::Target as Flavor>::Name>;
fn translate_enum_type(
        &self,
        diag: &mut Diagnostics,
        enum_type: <Self::Source as Flavor>::EnumType
    ) -> Result<<Self::Target as Flavor>::EnumType>; fn visit(
        &self,
        _: &mut Diagnostics,
        _: &<Self::Source as Flavor>::Name
    ) -> Result<()> { ... } }

Translator trait from one flavor to another.

Associated Types

Required Methods

Translate the given package from one flavor to another.

Translate the given type from one flavor to another.

Translate the given field from one flavor to another.

Translate the given endpoint from one flavor to another.

Translate a local declaration name.

Enum type to translate.

Provided Methods

Indicate that the given name has been visited.

Implementors