Protocol

Trait Protocol 

Source
pub trait Protocol {
    // Required methods
    fn initialize(&mut self) -> Result<(), Error>;
    fn send_message(&self, message: Message) -> Result<(), Error>;
    fn receive_message(&self) -> Result<Message, Error>;
}
Expand description

Represents the Model Context Protocol interface

Required Methods§

Source

fn initialize(&mut self) -> Result<(), Error>

Initialize the protocol connection

Source

fn send_message(&self, message: Message) -> Result<(), Error>

Send a message through the protocol

Source

fn receive_message(&self) -> Result<Message, Error>

Receive a message from the protocol

Implementors§