pub struct BeforeAgentStartHandler {
pub handler: BeforeAgentStartFn,
pub plugin_free_string: FreeStringFn,
pub user_data: *mut c_void,
}Expand description
A registered before_agent_start handler (system-prompt transform). Same
ownership shape as ResourcesDiscoverHandler: the handler produces a
plugin-owned out [StbString] the host reclaims via the plugin’s own
plugin_free_string, which therefore travels alongside. user_data is the
plugin’s opaque context.
SAFETY: same as RegisteredHandler — the plugin warrants handler is
callable from any thread and user_data is valid for the registry’s
lifetime; the host never frees user_data.
Fields§
§handler: BeforeAgentStartFn§plugin_free_string: FreeStringFn§user_data: *mut c_voidTrait Implementations§
Source§impl Clone for BeforeAgentStartHandler
impl Clone for BeforeAgentStartHandler
impl Copy for BeforeAgentStartHandler
impl Send for BeforeAgentStartHandler
impl Sync for BeforeAgentStartHandler
Auto Trait Implementations§
impl Freeze for BeforeAgentStartHandler
impl RefUnwindSafe for BeforeAgentStartHandler
impl Unpin for BeforeAgentStartHandler
impl UnsafeUnpin for BeforeAgentStartHandler
impl UnwindSafe for BeforeAgentStartHandler
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