pub struct AcpServer { /* private fields */ }Implementations§
Source§impl AcpServer
impl AcpServer
pub fn new(config: Config, acp_config: AcpServerConfig) -> AcpServer
pub fn new_with_writer( config: Config, acp_config: AcpServerConfig, writer_tx: Sender<String>, ) -> AcpServer
pub fn new_with_store( config: Config, acp_config: AcpServerConfig, store: Arc<AcpSessionStore>, ) -> AcpServer
pub fn new_with_writer_and_store( config: Config, acp_config: AcpServerConfig, writer_tx: Sender<String>, store: Arc<AcpSessionStore>, ) -> AcpServer
Sourcepub fn with_canvas_store(self, canvas_store: CanvasStore) -> AcpServer
pub fn with_canvas_store(self, canvas_store: CanvasStore) -> AcpServer
Attach the shared gateway CanvasStore so that agents created by
this server write canvas frames to the same store that the
/ws/canvas/:id WebSocket endpoint serves.
Sourcepub async fn run(self: Arc<AcpServer>) -> Result<(), Error>
pub async fn run(self: Arc<AcpServer>) -> Result<(), Error>
Run the ACP server, reading JSON-RPC requests from stdin and writing responses/notifications to stdout.
Sourcepub async fn run_messages(
self: Arc<AcpServer>,
input_rx: Receiver<String>,
) -> Result<(), Error>
pub async fn run_messages( self: Arc<AcpServer>, input_rx: Receiver<String>, ) -> Result<(), Error>
Run the ACP server against an already-framed line source.
This is used by the gateway WebSocket bridge, where inbound WebSocket
text messages are already complete JSON-RPC frames and outbound frames
are supplied by the writer channel passed to Self::new_with_writer
or Self::new_with_writer_and_store.
Auto Trait Implementations§
impl !Freeze for AcpServer
impl !RefUnwindSafe for AcpServer
impl Send for AcpServer
impl Sync for AcpServer
impl Unpin for AcpServer
impl UnsafeUnpin for AcpServer
impl !UnwindSafe for AcpServer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more