Enum llmvm_protocol::service::CoreResponse
source · pub enum CoreResponse {
Generation(GenerationResponse),
GenerationStream(GenerationResponse),
GetLastThreadInfo(Option<ThreadInfo>),
GetAllThreadInfos(Vec<ThreadInfo>),
GetThreadMessages(Vec<Message>),
InitProject,
}
Expand description
Enum containing all types of core responses.
Variants§
Generation(GenerationResponse)
GenerationStream(GenerationResponse)
GetLastThreadInfo(Option<ThreadInfo>)
GetAllThreadInfos(Vec<ThreadInfo>)
GetThreadMessages(Vec<Message>)
InitProject
Trait Implementations§
source§impl Clone for CoreResponse
impl Clone for CoreResponse
source§fn clone(&self) -> CoreResponse
fn clone(&self) -> CoreResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for CoreResponse
impl<'de> Deserialize<'de> for CoreResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl ResponseHttpConvert<CoreRequest, CoreResponse> for CoreResponse
impl ResponseHttpConvert<CoreRequest, CoreResponse> for CoreResponse
source§fn from_http_response<'life0, 'async_trait>(
response: ModalHttpResponse,
original_request: &'life0 CoreRequest
) -> Pin<Box<dyn Future<Output = Result<Option<ServiceResponse<Self>>, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn from_http_response<'life0, 'async_trait>(
response: ModalHttpResponse,
original_request: &'life0 CoreRequest
) -> Pin<Box<dyn Future<Output = Result<Option<ServiceResponse<Self>>, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deserializes a
ModalHttpResponse
into ServiceResponse<Response>
.
Returns a protocol error if the response conversion fails (i.e.
response validation fails, unexpected error, etc.). A reference to the associated
request is provided, in case it’s helpful. Returns None
if the response type is unknown or unsupported
for remote host scenarios, which is synonymous with a “not found” error.source§fn to_http_response(
response: ServiceResponse<Self>
) -> Result<Option<ModalHttpResponse>, ProtocolError>
fn to_http_response( response: ServiceResponse<Self> ) -> Result<Option<ModalHttpResponse>, ProtocolError>
Serializes a
Response
into a ModalHttpResponse
.
Returns None
if the response type is unsupported, which is synonymous
with a “not found” error.source§impl ResponseJsonRpcConvert<CoreRequest, CoreResponse> for CoreResponse
impl ResponseJsonRpcConvert<CoreRequest, CoreResponse> for CoreResponse
source§fn from_jsonrpc_message(
value: JsonRpcMessage,
original_request: &CoreRequest
) -> Result<Option<Self>, ProtocolError>
fn from_jsonrpc_message( value: JsonRpcMessage, original_request: &CoreRequest ) -> Result<Option<Self>, ProtocolError>
Deserializes a
JsonRpcResponse
or
JsonRpcNotification
into Response
.
Returns a protocol error if the response conversion fails (i.e.
response validation fails, unexpected error, etc.). A reference to the associated
request is provided, in case it’s helpful. Returns None
if the response type is unknown or unsupported,
which is synonymous with a “not found” error.source§fn into_jsonrpc_message(response: CoreResponse, id: Value) -> JsonRpcMessage
fn into_jsonrpc_message(response: CoreResponse, id: Value) -> JsonRpcMessage
Serializes a
Response
into a JsonRpcResponse
or
JsonRpcNotification
.
Notifications must use the provided id
argument as the method
value.
Returns Value::Null
Auto Trait Implementations§
impl RefUnwindSafe for CoreResponse
impl Send for CoreResponse
impl Sync for CoreResponse
impl Unpin for CoreResponse
impl UnwindSafe for CoreResponse
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