pub struct GithubSearchTool { /* private fields */ }Expand description
A Tool that runs a live GitHub search through a GithubSearchBackend,
scoped to a default owner/repo.
Implementations§
Source§impl GithubSearchTool
impl GithubSearchTool
Sourcepub fn new(
auth: GithubAuth,
owner: impl Into<String>,
repo: impl Into<String>,
) -> Self
pub fn new( auth: GithubAuth, owner: impl Into<String>, repo: impl Into<String>, ) -> Self
Build the tool over an auth and a default owner/repo scope, using the
live OctocrabGithubSearch backend.
Sourcepub fn with_backend(
backend: Arc<dyn GithubSearchBackend>,
owner: impl Into<String>,
repo: impl Into<String>,
) -> Self
pub fn with_backend( backend: Arc<dyn GithubSearchBackend>, owner: impl Into<String>, repo: impl Into<String>, ) -> Self
Build the tool over an explicit backend (tests inject a stub).
Trait Implementations§
Source§impl Tool for GithubSearchTool
impl Tool for GithubSearchTool
fn schema(&self) -> ToolSchema
fn execute<'life0, 'async_trait>(
&'life0 self,
arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Whether this tool only reads and has no side effects.
Defaults to
false.Source§fn is_concurrent_safe(&self) -> bool
fn is_concurrent_safe(&self) -> bool
Whether this tool is safe to run concurrently with other tools.
Defaults to
true.Auto Trait Implementations§
impl !RefUnwindSafe for GithubSearchTool
impl !UnwindSafe for GithubSearchTool
impl Freeze for GithubSearchTool
impl Send for GithubSearchTool
impl Sync for GithubSearchTool
impl Unpin for GithubSearchTool
impl UnsafeUnpin for GithubSearchTool
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request