pub struct ProjectionCompiler {
pub include_tracing: bool,
}Expand description
Projection compiler: validates, projects, and generates code from choreographies.
Fields§
§include_tracing: boolWhether to include tracing spans in generated code.
Implementations§
Source§impl ProjectionCompiler
impl ProjectionCompiler
Sourcepub fn compile(
&self,
protocol: &GlobalProtocol,
participant: &str,
) -> Result<ProjectionOutput, CompilationError>
pub fn compile( &self, protocol: &GlobalProtocol, participant: &str, ) -> Result<ProjectionOutput, CompilationError>
Compile a global protocol for a specific participant.
Validates the protocol, projects it to a local type, and generates Rust code including session type aliases, message structs, and handler function skeletons.
Sourcepub fn compile_all(
&self,
protocol: &GlobalProtocol,
) -> Result<BTreeMap<String, ProjectionOutput>, CompilationError>
pub fn compile_all( &self, protocol: &GlobalProtocol, ) -> Result<BTreeMap<String, ProjectionOutput>, CompilationError>
Compile a global protocol for all participants.
Returns a map from participant name to projection output.
Trait Implementations§
Source§impl Debug for ProjectionCompiler
impl Debug for ProjectionCompiler
Auto Trait Implementations§
impl Freeze for ProjectionCompiler
impl RefUnwindSafe for ProjectionCompiler
impl Send for ProjectionCompiler
impl Sync for ProjectionCompiler
impl Unpin for ProjectionCompiler
impl UnsafeUnpin for ProjectionCompiler
impl UnwindSafe for ProjectionCompiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).