pub struct ProgramDiagram<Roster: DescribeRoster> { /* private fields */ }Expand description
Experimental development scaffolding; not ready for application consumption.
A compiled program boundary view. Routing remains the board’s runtime decision. Rendered type labels abbreviate paths; accessors retain compiler-qualified names.
Equal-looking roles do not make two rosters interchangeable:
ⓘ
use pipecircuit::{Pipe, Switchboard};
use pipecircuit_visualization::ProgramDiagram;
struct Protocol;
impl Pipe for Protocol { type In<'a> = (); type Out<'a> = (); }
pipecircuit::pipe_roster! { mod first { client: super::Protocol } }
pipecircuit::pipe_roster! { mod second { client: super::Protocol } }
struct Board;
impl Switchboard for Board {
type From<'a> = first::From<'a>;
type To<'a> = first::To<'a>;
fn route<'a>(&mut self, from: Self::From<'a>) -> Self::To<'a> {
match from { first::From::Client(()) => first::To::Client(()) }
}
}
let mismatched = ProgramDiagram::<second::Schema>::for_board::<Board>();Implementations§
Source§impl<Roster: DescribeRoster> ProgramDiagram<Roster>
impl<Roster: DescribeRoster> ProgramDiagram<Roster>
pub fn for_board<Board: Switchboard>() -> Self
pub fn board(&self) -> &'static str
pub fn pipes(&self) -> &[PipeDescription]
Sourcepub fn render_html(&self) -> String
pub fn render_html(&self) -> String
A standalone browser view with expandable declarations and an optional physical layer. No scripts, network resources or live runtime polling.
pub fn render(&self, target: DiagramTarget) -> String
Sourcepub fn installed<Bindings: DescribeBindings<Roster = Roster>>(
&self,
bindings: &Bindings,
) -> InstallationDiagram
pub fn installed<Bindings: DescribeBindings<Roster = Roster>>( &self, bindings: &Bindings, ) -> InstallationDiagram
The binding inventory must name this exact roster; unrelated installations cannot be combined merely because their fields have equal spellings.
Auto Trait Implementations§
impl<Roster> Freeze for ProgramDiagram<Roster>
impl<Roster> RefUnwindSafe for ProgramDiagram<Roster>
impl<Roster> Send for ProgramDiagram<Roster>
impl<Roster> Sync for ProgramDiagram<Roster>
impl<Roster> Unpin for ProgramDiagram<Roster>
impl<Roster> UnsafeUnpin for ProgramDiagram<Roster>
impl<Roster> UnwindSafe for ProgramDiagram<Roster>
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