pub struct RequestScope {
pub request_id: String,
pub capture: CaptureSink,
pub cancel: CancellationToken,
pub headers: Header,
pub query: Header,
pub pinned_auth_id: Option<String>,
pub execution_session: Option<String>,
pub request_path: String,
pub api_key: String,
pub access_provider: String,
}Expand description
What a callback context remembers about the request it serves.
Fields§
§request_id: StringGo logging.GetRequestID, added to host.log entries.
capture: CaptureSinkThe request’s upstream capture (Go’s request-log context): host.http.*
records each plugin HTTP exchange in it.
cancel: CancellationTokenThe request’s cancellation (Go’s request context): host.http.* operations
opened under the context end when it fires.
headers: HeaderInbound values inherited by host.model callbacks that omit overrides.
query: Header§pinned_auth_id: Option<String>Internal execution context; never serialized to plugin RPC requests.
execution_session: Option<String>§request_path: String§api_key: StringThe client’s usage identity (Go’s parent callback context: userApiKey and
accessProvider), for the usage records of nested host.model.* calls.
access_provider: StringTrait Implementations§
Source§impl Clone for RequestScope
impl Clone for RequestScope
Source§impl Debug for RequestScope
impl Debug for RequestScope
Auto Trait Implementations§
impl !RefUnwindSafe for RequestScope
impl !UnwindSafe for RequestScope
impl Freeze for RequestScope
impl Send for RequestScope
impl Sync for RequestScope
impl Unpin for RequestScope
impl UnsafeUnpin for RequestScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more