pub struct AgentBackend { /* private fields */ }Implementations§
Source§impl AgentBackend
impl AgentBackend
pub fn new(state: AppState) -> AgentBackend
Trait Implementations§
Source§impl AnonBackend for AgentBackend
impl AnonBackend for AgentBackend
Source§async fn poll_audit(
&self,
_: &AnonCaller,
audit_id: &str,
) -> Result<QuickAuditState, String>
async fn poll_audit( &self, _: &AnonCaller, audit_id: &str, ) -> Result<QuickAuditState, String>
quick_audit looks at its audit every second or so while it waits; those looks are part
of the one tool call the client’s allowance already counted.
Source§async fn quick_audit(
&self,
who: &AnonCaller,
url: &str,
) -> Result<QuickAuditState, String>
async fn quick_audit( &self, who: &AnonCaller, url: &str, ) -> Result<QuickAuditState, String>
Starts a quick audit of
url (or joins the running one, or reuses the finished one from
the last 24 hours) and says where it stands right now.Source§async fn get_audit(
&self,
who: &AnonCaller,
audit_id: &str,
) -> Result<QuickAuditState, String>
async fn get_audit( &self, who: &AnonCaller, audit_id: &str, ) -> Result<QuickAuditState, String>
Where a quick audit stands. Anything that isn’t a quick audit is “no such audit”.
Source§async fn audit_issue_urls(
&self,
who: &AnonCaller,
audit_id: &str,
check: &str,
limit: Option<u32>,
offset: Option<u32>,
) -> Result<AuditIssueUrls, String>
async fn audit_issue_urls( &self, who: &AnonCaller, audit_id: &str, check: &str, limit: Option<u32>, offset: Option<u32>, ) -> Result<AuditIssueUrls, String>
The pages of a finished quick audit that fail one check.
Source§async fn start_monitoring(
&self,
who: &AnonCaller,
url: &str,
email: &str,
) -> Result<MonitoringRequested, String>
async fn start_monitoring( &self, who: &AnonCaller, url: &str, email: &str, ) -> Result<MonitoringRequested, String>
Emails
email a link that, once opened and confirmed, starts monitoring url.Source§impl Clone for AgentBackend
impl Clone for AgentBackend
Source§impl CloudBackend for AgentBackend
impl CloudBackend for AgentBackend
Source§type Anon = AnonCaller
type Anon = AnonCaller
What is known about a caller without a key (no-key tools only).
async fn list_sites(&self, who: &ApiCaller) -> Result<Vec<SiteInfo>, String>
async fn site_health( &self, who: &ApiCaller, site_id: &str, ) -> Result<SiteHealth, String>
async fn issue_urls( &self, who: &ApiCaller, site_id: &str, check: &str, limit: Option<u32>, offset: Option<u32>, ) -> Result<IssueUrlsPage, String>
async fn page( &self, who: &ApiCaller, site_id: &str, url: &str, ) -> Result<PageInfo, String>
async fn changes( &self, who: &ApiCaller, site_id: &str, severity: Option<&str>, limit: Option<u32>, offset: Option<u32>, ) -> Result<ChangesPage, String>
async fn run_crawl( &self, who: &ApiCaller, site_id: &str, ) -> Result<CrawlQueued, String>
Source§async fn reject(
&self,
who: &ApiCaller,
message: String,
) -> Result<Infallible, String>
async fn reject( &self, who: &ApiCaller, message: String, ) -> Result<Infallible, String>
Counts one call for a tool call whose arguments were unusable (not even the right JSON
shape), like any other call, and gives back what to tell the agent:
message, or the
quota message when the allowance is spent. It always answers with an error, which the
type says: there is no Ok value to be empty.Auto Trait Implementations§
impl !RefUnwindSafe for AgentBackend
impl !UnwindSafe for AgentBackend
impl Freeze for AgentBackend
impl Send for AgentBackend
impl Sync for AgentBackend
impl Unpin for AgentBackend
impl UnsafeUnpin for AgentBackend
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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