pub struct LuaProfileAdapter {
definition: ProfileDefinition,
config: Arc<Config>,
}Expand description
Adapter that wraps a Lua ProfileDefinition as a Profile trait object.
This allows Lua profiles to participate in unified profile dispatch alongside TOML and custom Rust profiles.
Fields§
§definition: ProfileDefinitionThe underlying Lua profile definition.
config: Arc<Config>Application config needed for the context bridge.
Implementations§
Source§impl LuaProfileAdapter
impl LuaProfileAdapter
Sourcepub fn new(definition: ProfileDefinition, config: Arc<Config>) -> Self
pub fn new(definition: ProfileDefinition, config: Arc<Config>) -> Self
Create a new adapter wrapping a Lua profile definition.
Trait Implementations§
Source§impl Profile for LuaProfileAdapter
impl Profile for LuaProfileAdapter
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a one-line description for profile discovery.
Source§fn arguments(&self) -> Vec<ProfileArgument>
fn arguments(&self) -> Vec<ProfileArgument>
Returns the arguments this profile accepts (may be empty). Read more
Source§fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ProfilePrompt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ProfilePrompt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve the profile’s prompt, optionally using the
ToolContext
for dynamic context injection (e.g., pre-searching the KB). Read moreAuto Trait Implementations§
impl Freeze for LuaProfileAdapter
impl RefUnwindSafe for LuaProfileAdapter
impl Send for LuaProfileAdapter
impl Sync for LuaProfileAdapter
impl Unpin for LuaProfileAdapter
impl UnsafeUnpin for LuaProfileAdapter
impl UnwindSafe for LuaProfileAdapter
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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