pub struct CopilotWebSocketResponse { /* private fields */ }Expand description
The runtime-facing side of a WebSocket: a CopilotWebSocketHandler writes
upstream→runtime messages here.
Implementations§
Source§impl CopilotWebSocketResponse
impl CopilotWebSocketResponse
Sourcepub async fn send_message(
&self,
message: CopilotWebSocketMessage,
) -> Result<(), CopilotRequestError>
pub async fn send_message( &self, message: CopilotWebSocketMessage, ) -> Result<(), CopilotRequestError>
Forward one upstream message to the runtime.
Sourcepub async fn close(&self) -> Result<(), CopilotRequestError>
pub async fn close(&self) -> Result<(), CopilotRequestError>
End the runtime response stream (the upstream connection closed).
Trait Implementations§
Source§impl Clone for CopilotWebSocketResponse
impl Clone for CopilotWebSocketResponse
Source§fn clone(&self) -> CopilotWebSocketResponse
fn clone(&self) -> CopilotWebSocketResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CopilotWebSocketResponse
impl !UnwindSafe for CopilotWebSocketResponse
impl Freeze for CopilotWebSocketResponse
impl Send for CopilotWebSocketResponse
impl Sync for CopilotWebSocketResponse
impl Unpin for CopilotWebSocketResponse
impl UnsafeUnpin for CopilotWebSocketResponse
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