Trait reproto_backend::PackageProcessor
[−]
[src]
pub trait PackageProcessor<'el> where
Self: 'el + Sized, { type Out: Default + IntoBytes<Self>; type DeclIter: Iterator<Item = &'el RpDecl>; fn ext(&self) -> &str; fn decl_iter(&self) -> Self::DeclIter; fn handle(&self) -> &'el Handle; fn processed_package(&self, package: &RpVersionedPackage) -> RpPackage; fn default_process(
&self,
_: &mut Self::Out,
name: &'el RpName
) -> Result<()> { ... } fn process_interface(
&self,
out: &mut Self::Out,
body: &'el RpInterfaceBody
) -> Result<()> { ... } fn process_type(
&self,
out: &mut Self::Out,
body: &'el RpTypeBody
) -> Result<()> { ... } fn process_tuple(
&self,
out: &mut Self::Out,
body: &'el RpTupleBody
) -> Result<()> { ... } fn process_enum(
&self,
out: &mut Self::Out,
body: &'el RpEnumBody
) -> Result<()> { ... } fn process_service(
&self,
out: &mut Self::Out,
body: &'el RpServiceBody
) -> Result<()> { ... } fn populate_files(&self) -> Result<BTreeMap<RpVersionedPackage, Self::Out>> { ... } fn do_populate_files<F>(
&self,
callback: F
) -> Result<BTreeMap<RpVersionedPackage, Self::Out>>
where
F: FnMut(&'el RpDecl) -> Result<()>, { ... } fn resolve_full_path(&self, package: &RpPackage) -> Result<RelativePathBuf> { ... } fn setup_module_path(&self, package: &RpPackage) -> Result<RelativePathBuf> { ... } fn write_files(
&'el self,
files: BTreeMap<RpVersionedPackage, Self::Out>
) -> Result<()> { ... } }
Associated Types
Required Methods
fn ext(&self) -> &str
fn decl_iter(&self) -> Self::DeclIter
Iterate over all existing declarations.
fn handle(&self) -> &'el Handle
fn processed_package(&self, package: &RpVersionedPackage) -> RpPackage
Provided Methods
fn default_process(&self, _: &mut Self::Out, name: &'el RpName) -> Result<()>
fn process_interface(
&self,
out: &mut Self::Out,
body: &'el RpInterfaceBody
) -> Result<()>
&self,
out: &mut Self::Out,
body: &'el RpInterfaceBody
) -> Result<()>
fn process_type(&self, out: &mut Self::Out, body: &'el RpTypeBody) -> Result<()>
fn process_tuple(
&self,
out: &mut Self::Out,
body: &'el RpTupleBody
) -> Result<()>
&self,
out: &mut Self::Out,
body: &'el RpTupleBody
) -> Result<()>
fn process_enum(&self, out: &mut Self::Out, body: &'el RpEnumBody) -> Result<()>
fn process_service(
&self,
out: &mut Self::Out,
body: &'el RpServiceBody
) -> Result<()>
&self,
out: &mut Self::Out,
body: &'el RpServiceBody
) -> Result<()>
fn populate_files(&self) -> Result<BTreeMap<RpVersionedPackage, Self::Out>>
fn do_populate_files<F>(
&self,
callback: F
) -> Result<BTreeMap<RpVersionedPackage, Self::Out>> where
F: FnMut(&'el RpDecl) -> Result<()>,
&self,
callback: F
) -> Result<BTreeMap<RpVersionedPackage, Self::Out>> where
F: FnMut(&'el RpDecl) -> Result<()>,
fn resolve_full_path(&self, package: &RpPackage) -> Result<RelativePathBuf>
fn setup_module_path(&self, package: &RpPackage) -> Result<RelativePathBuf>
fn write_files(
&'el self,
files: BTreeMap<RpVersionedPackage, Self::Out>
) -> Result<()>
&'el self,
files: BTreeMap<RpVersionedPackage, Self::Out>
) -> Result<()>