pub struct CodexConnection { /* private fields */ }Expand description
Connection-local Codex protocol state. JSON ids and subscriptions never enter canonical runtime state.
Implementations§
Source§impl CodexConnection
impl CodexConnection
Sourcepub async fn handle(&mut self, message: Value) -> Vec<Value>
pub async fn handle(&mut self, message: Value) -> Vec<Value>
Handle one stock app-server request/notification. The returned values are already ordered exactly as they must be written to the client.
Sourcepub async fn next_notifications(&mut self) -> Result<Vec<Value>, AdapterError>
pub async fn next_notifications(&mut self) -> Result<Vec<Value>, AdapterError>
Read and translate the next canonical event. No canonical payload is
modified; unrecognized payloads remain in a warning’s _supercode.raw.
Sourcepub async fn handle_server_response(
&mut self,
message: &Value,
) -> Result<Vec<Value>, AdapterError>
pub async fn handle_server_response( &mut self, message: &Value, ) -> Result<Vec<Value>, AdapterError>
Resolve a server request response, which has an id but no method.
Auto Trait Implementations§
impl !RefUnwindSafe for CodexConnection
impl !UnwindSafe for CodexConnection
impl Freeze for CodexConnection
impl Send for CodexConnection
impl Sync for CodexConnection
impl Unpin for CodexConnection
impl UnsafeUnpin for CodexConnection
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