#[non_exhaustive]pub struct PromptContext<'a, S> {
pub server: &'a S,
pub name: String,
pub arguments: Option<Map<String, Value>>,
pub context: RequestContext<RoleServer>,
}Available on crate feature
server only.Expand description
Context for prompt retrieval operations
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.server: &'a S§name: String§arguments: Option<Map<String, Value>>§context: RequestContext<RoleServer>Implementations§
Source§impl<'a, S> PromptContext<'a, S>
impl<'a, S> PromptContext<'a, S>
pub fn new( server: &'a S, name: String, arguments: Option<Map<String, Value>>, context: RequestContext<RoleServer>, ) -> Self
Trait Implementations§
Source§impl<S> AsRequestContext for PromptContext<'_, S>
impl<S> AsRequestContext for PromptContext<'_, S>
fn as_request_context(&self) -> &RequestContext<RoleServer>
fn as_request_context_mut(&mut self) -> &mut RequestContext<RoleServer>
Source§impl<S> FromContextPart<PromptContext<'_, S>> for PromptName
impl<S> FromContextPart<PromptContext<'_, S>> for PromptName
fn from_context_part( context: &mut PromptContext<'_, S>, ) -> Result<Self, ErrorData>
Source§impl<S, P> FromContextPart<PromptContext<'_, S>> for Parameters<P>where
P: DeserializeOwned,
impl<S, P> FromContextPart<PromptContext<'_, S>> for Parameters<P>where
P: DeserializeOwned,
fn from_context_part( context: &mut PromptContext<'_, S>, ) -> Result<Self, ErrorData>
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for PromptContext<'a, S>
impl<'a, S> !UnwindSafe for PromptContext<'a, S>
impl<'a, S> Freeze for PromptContext<'a, S>
impl<'a, S> Send for PromptContext<'a, S>where
S: Sync,
impl<'a, S> Sync for PromptContext<'a, S>where
S: Sync,
impl<'a, S> Unpin for PromptContext<'a, S>
impl<'a, S> UnsafeUnpin for PromptContext<'a, S>
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