pub struct StaticContextProvider { /* private fields */ }Expand description
Deterministic provider returning an immutable module snapshot.
Implementations§
Source§impl StaticContextProvider
impl StaticContextProvider
Sourcepub const fn new(id: ContextProviderId, modules: Vec<PromptModule>) -> Self
pub const fn new(id: ContextProviderId, modules: Vec<PromptModule>) -> Self
Creates one static provider.
Trait Implementations§
Source§impl Clone for StaticContextProvider
impl Clone for StaticContextProvider
Source§fn clone(&self) -> StaticContextProvider
fn clone(&self) -> StaticContextProvider
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 ContextProvider for StaticContextProvider
impl ContextProvider for StaticContextProvider
Source§fn id(&self) -> &ContextProviderId
fn id(&self) -> &ContextProviderId
Returns stable provider identity.
Source§fn provide(&self, _request: ContextRequest) -> ContextProviderFuture<'_>
fn provide(&self, _request: ContextRequest) -> ContextProviderFuture<'_>
Produces bounded modules from one immutable request.
Auto Trait Implementations§
impl Freeze for StaticContextProvider
impl RefUnwindSafe for StaticContextProvider
impl Send for StaticContextProvider
impl Sync for StaticContextProvider
impl Unpin for StaticContextProvider
impl UnsafeUnpin for StaticContextProvider
impl UnwindSafe for StaticContextProvider
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