Class RustOutputManager
java.lang.Object
uk.co.real_logic.sbe.generation.rust.RustOutputManager
- All Implemented Interfaces:
OutputManager
OutputManager for managing the creation of Rust source files as the target of code generation.
The character encoding for the Writer is UTF-8.-
Constructor Summary
ConstructorsConstructorDescriptionRustOutputManager(String baseDirName, String packageName) Create a newOutputManagerfor generating rust source files into a given module. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new Cargo.toml file.createOutput(String name) Create a new output which will be a rust source file in the given module.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.agrona.generation.OutputManager
withOutput
-
Constructor Details
-
RustOutputManager
Create a newOutputManagerfor generating rust source files into a given module.- Parameters:
baseDirName- for the generated source code.packageName- for the generated source code relative to the baseDirName.
-
-
Method Details
-
createOutput
Create a new output which will be a rust source file in the given module.The
Writershould be closed once the caller has finished with it. The Writer is buffered for efficient IO operations.- Specified by:
createOutputin interfaceOutputManager- Parameters:
name- the name of the rust struct.- Returns:
- a
Writerto which the source code should be written. - Throws:
IOException- if an issue occurs when creating the file.
-
createCargoToml
Creates a new Cargo.toml file.- Returns:
- a
Writerto which the crate definition should be written. - Throws:
IOException- if an issue occurs when creating the file.
-