Trait reproto_manifest::Lang [] [src]

pub trait Lang: Debug {
    fn copy(&self) -> Box<Lang>;
fn module_specs(
        &self,
        path: &Path,
        input: Option<Value>
    ) -> Result<Vec<Box<Any>>>;
fn string_spec(&self, path: &Path, input: &str) -> Result<Box<Any>>;
fn compile(
        &self,
        ctx: Rc<Context>,
        env: Environment<CoreFlavor>,
        manifest: Manifest
    ) -> Result<()>; fn comment(&self, _input: &str) -> Option<String> { ... }
fn keywords(&self) -> Vec<(&'static str, &'static str)> { ... }
fn safe_packages(&self) -> bool { ... }
fn into_env(
        &self,
        ctx: Rc<Context>,
        package_prefix: Option<RpPackage>,
        resolver: Box<Resolver>
    ) -> Environment<CoreFlavor> { ... }
fn package_naming(&self) -> Option<Box<Naming>> { ... }
fn field_ident_naming(&self) -> Option<Box<Naming>> { ... }
fn endpoint_ident_naming(&self) -> Option<Box<Naming>> { ... } }

The trait that describes the specific implementation of a given language.

TODO: move language-specific integrations into own crate. Options would have to be transferred to a local type.

Required Methods

Copy self.

Implemented through lang_base! macro.

Parse a complex set of module configurations.

Implemented through lang_base! macro.

Parse a module configuration consisting of only a string.

Implemented through lang_base! macro.

Language-specific compile hook.

Implemented through lang_base! macro.

Provided Methods

Comment the given string.

Get a list of keywords to transliterate.

Indicates if the language requires keyword-escaping in the packages.

Helper to convert into environment.

Rename packages according to the given naming convention.

Rename fields according to the given naming convention.

Rename endpoint identifiers according to the given naming convention.

Implementors