pub struct Conductor<Link: ConductorLink> { /* private fields */ }Expand description
The conductor manages the proxy chain lifecycle and message routing.
It maintains connections to all components in the chain and routes messages bidirectionally between the editor, components, and agent.
Implementations§
Source§impl<Link: ConductorLink> Conductor<Link>
impl<Link: ConductorLink> Conductor<Link>
pub fn new( link: Link, name: impl ToString, instantiator: Link::Instantiator, mcp_bridge_mode: McpBridgeMode, ) -> Self
Source§impl Conductor<ConductorToClient>
impl Conductor<ConductorToClient>
Sourcepub fn new_agent(
name: impl ToString,
instantiator: impl InstantiateProxiesAndAgent + 'static,
mcp_bridge_mode: McpBridgeMode,
) -> Self
pub fn new_agent( name: impl ToString, instantiator: impl InstantiateProxiesAndAgent + 'static, mcp_bridge_mode: McpBridgeMode, ) -> Self
Create a conductor in agent mode (the last component is an agent).
Source§impl Conductor<ConductorToConductor>
impl Conductor<ConductorToConductor>
Sourcepub fn new_proxy(
name: impl ToString,
instantiator: impl InstantiateProxies + 'static,
mcp_bridge_mode: McpBridgeMode,
) -> Self
pub fn new_proxy( name: impl ToString, instantiator: impl InstantiateProxies + 'static, mcp_bridge_mode: McpBridgeMode, ) -> Self
Create a conductor in proxy mode (forwards to another conductor).
Source§impl<Link: ConductorLink> Conductor<Link>
impl<Link: ConductorLink> Conductor<Link>
Sourcepub fn trace_to(self, dest: impl WriteEvent) -> Self
pub fn trace_to(self, dest: impl WriteEvent) -> Self
Enable trace logging to a custom destination.
Use sacp-trace-viewer to view the trace as an interactive sequence diagram.
Sourcepub fn trace_to_path(self, path: impl AsRef<Path>) -> Result<Self>
pub fn trace_to_path(self, path: impl AsRef<Path>) -> Result<Self>
Enable trace logging to a file path.
Events will be written as newline-delimited JSON (.jsons format).
Use sacp-trace-viewer to view the trace as an interactive sequence diagram.
Sourcepub fn with_trace_writer(self, writer: TraceWriter) -> Self
pub fn with_trace_writer(self, writer: TraceWriter) -> Self
Enable trace logging with an existing TraceWriter.
pub fn into_connection_builder( self, ) -> JrConnectionBuilder<impl JrMessageHandler<Link = Link>, impl JrResponder<Link>>
Trait Implementations§
Auto Trait Implementations§
impl<Link> Freeze for Conductor<Link>
impl<Link> !RefUnwindSafe for Conductor<Link>
impl<Link> Send for Conductor<Link>
impl<Link> !Sync for Conductor<Link>
impl<Link> Unpin for Conductor<Link>
impl<Link> !UnwindSafe for Conductor<Link>
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