pub struct LlmRequestInterceptOutcome {
pub request: LlmRequest,
pub annotated_request: Option<AnnotatedLlmRequest>,
pub pending_marks: Vec<PendingMarkSpec>,
}Expand description
Result of an LLM request intercept that can schedule lifecycle marks.
Fields§
§request: LlmRequestRewritten provider request when no request codec is active.
With a request codec, callbacks may rewrite headers, but content
is read-only and provider-body changes must be made through
Self::annotated_request.
annotated_request: Option<AnnotatedLlmRequest>Optional normalized request annotation to carry forward.
This is required and authoritative for provider content when a request codec is active. It remains optional when no request codec is active.
pending_marks: Vec<PendingMarkSpec>Ordered marks to emit after Relay creates and starts the LLM scope.
Implementations§
Source§impl LlmRequestInterceptOutcome
impl LlmRequestInterceptOutcome
Sourcepub fn new(
request: LlmRequest,
annotated_request: Option<AnnotatedLlmRequest>,
) -> LlmRequestInterceptOutcome
pub fn new( request: LlmRequest, annotated_request: Option<AnnotatedLlmRequest>, ) -> LlmRequestInterceptOutcome
Create an outcome without pending marks.
Sourcepub fn with_pending_mark(
self,
mark: PendingMarkSpec,
) -> LlmRequestInterceptOutcome
pub fn with_pending_mark( self, mark: PendingMarkSpec, ) -> LlmRequestInterceptOutcome
Append one pending mark while preserving interceptor order.
Trait Implementations§
Source§impl Clone for LlmRequestInterceptOutcome
impl Clone for LlmRequestInterceptOutcome
Source§fn clone(&self) -> LlmRequestInterceptOutcome
fn clone(&self) -> LlmRequestInterceptOutcome
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 moreSource§impl Debug for LlmRequestInterceptOutcome
impl Debug for LlmRequestInterceptOutcome
Source§impl<'de> Deserialize<'de> for LlmRequestInterceptOutcome
impl<'de> Deserialize<'de> for LlmRequestInterceptOutcome
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LlmRequestInterceptOutcome, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LlmRequestInterceptOutcome, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<(LlmRequest, AnnotatedLlmRequest)> for LlmRequestInterceptOutcome
impl From<(LlmRequest, AnnotatedLlmRequest)> for LlmRequestInterceptOutcome
Source§fn from(_: (LlmRequest, AnnotatedLlmRequest)) -> LlmRequestInterceptOutcome
fn from(_: (LlmRequest, AnnotatedLlmRequest)) -> LlmRequestInterceptOutcome
Converts to this type from the input type.
Source§impl From<(LlmRequest, Option<AnnotatedLlmRequest>)> for LlmRequestInterceptOutcome
impl From<(LlmRequest, Option<AnnotatedLlmRequest>)> for LlmRequestInterceptOutcome
Source§fn from(
_: (LlmRequest, Option<AnnotatedLlmRequest>),
) -> LlmRequestInterceptOutcome
fn from( _: (LlmRequest, Option<AnnotatedLlmRequest>), ) -> LlmRequestInterceptOutcome
Converts to this type from the input type.
Source§impl From<LlmRequest> for LlmRequestInterceptOutcome
impl From<LlmRequest> for LlmRequestInterceptOutcome
Source§fn from(request: LlmRequest) -> LlmRequestInterceptOutcome
fn from(request: LlmRequest) -> LlmRequestInterceptOutcome
Converts to this type from the input type.
Source§impl PartialEq for LlmRequestInterceptOutcome
impl PartialEq for LlmRequestInterceptOutcome
Source§fn eq(&self, other: &LlmRequestInterceptOutcome) -> bool
fn eq(&self, other: &LlmRequestInterceptOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LlmRequestInterceptOutcome
impl Serialize for LlmRequestInterceptOutcome
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LlmRequestInterceptOutcome
Auto Trait Implementations§
impl Freeze for LlmRequestInterceptOutcome
impl RefUnwindSafe for LlmRequestInterceptOutcome
impl Send for LlmRequestInterceptOutcome
impl Sync for LlmRequestInterceptOutcome
impl Unpin for LlmRequestInterceptOutcome
impl UnsafeUnpin for LlmRequestInterceptOutcome
impl UnwindSafe for LlmRequestInterceptOutcome
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