#[non_exhaustive]pub struct CopilotRequestContext {
pub request_id: String,
pub session_id: Option<String>,
pub transport: CopilotRequestTransport,
pub url: String,
pub headers: HeaderMap,
pub cancel: CancellationToken,
}Expand description
Context describing an intercepted request, shared by the HTTP and WebSocket seams.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_id: StringOpaque runtime-minted request id, stable across the request lifecycle.
session_id: Option<String>Id of the runtime session that triggered this request, or None when it
was issued outside any session (for example the startup model catalog).
transport: CopilotRequestTransportTransport the runtime would otherwise use.
url: StringAbsolute request URL.
headers: HeaderMapRequest headers, multi-valued.
cancel: CancellationTokenFires when the runtime cancels this in-flight request.
Trait Implementations§
Source§impl Clone for CopilotRequestContext
impl Clone for CopilotRequestContext
Source§fn clone(&self) -> CopilotRequestContext
fn clone(&self) -> CopilotRequestContext
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 Freeze for CopilotRequestContext
impl RefUnwindSafe for CopilotRequestContext
impl Send for CopilotRequestContext
impl Sync for CopilotRequestContext
impl Unpin for CopilotRequestContext
impl UnsafeUnpin for CopilotRequestContext
impl UnwindSafe for CopilotRequestContext
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