pub struct Registry<'a> { /* private fields */ }Expand description
Human catalog only. Claimant authorization belongs to the request lifecycle.
Implementations§
Source§impl<'a> Registry<'a>
impl<'a> Registry<'a>
pub fn new(config: &'a RepoConfig, eval_id: &EvalId) -> Result<Self, String>
pub fn for_artifact( config: &'a RepoConfig, artifact_id: &ArtifactName, ) -> Result<Self, String>
pub fn list(&self) -> impl Iterator<Item = &ToolDefinition>
pub fn is_command(&self, name: &ToolName) -> bool
pub fn preflight(&self, name: &ToolName) -> Result<(), String>
Sourcepub fn command(&self, name: &ToolName) -> Result<CommandLine, String>
pub fn command(&self, name: &ToolName) -> Result<CommandLine, String>
Resolve the command line a call would run, without running it.
pub async fn call( &self, name: &ToolName, cancellation: CancellationToken, ) -> ToolResult
Sourcepub async fn call_logged(
&self,
name: &ToolName,
cancellation: CancellationToken,
run: Run,
) -> ToolResult
pub async fn call_logged( &self, name: &ToolName, cancellation: CancellationToken, run: Run, ) -> ToolResult
Run tool name, its output reaching run’s Tool log while it runs, and end the run:
a launched program’s when it exits.
Auto Trait Implementations§
impl<'a> Forget for Registry<'a>
impl<'a> Freeze for Registry<'a>where
&'a RepoConfig: Freeze,
*const LeafNode<ArtifactName, &'a Artifact> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(ArtifactName, &'a Artifact)>>: Freeze,
*const LeafNode<ToolName, RegisteredTool<'a>> is !null: Freeze,
PhantomData<Box<(ToolName, RegisteredTool<'a>)>>: Freeze,
impl<'a> Move for Registry<'a>
impl<'a> RefUnwindSafe for Registry<'a>where
Atomic<usize>: RefUnwindSafe,
Pool<Cache, Box<dyn Fn() -> Cache + Sync + RefUnwindSafe + Send + UnwindSafe>>: RefUnwindSafe,
Pool<PatternSet, Box<dyn Fn() -> PatternSet + Sync + RefUnwindSafe + Send + UnwindSafe>>: RefUnwindSafe,
Pool<Vec<usize>, fn() -> Vec<usize>>: RefUnwindSafe,
impl<'a> Send for Registry<'a>where
&'a RepoConfig: Send,
NodeRef<Owned, ArtifactName, &'a Artifact, LeafOrInternal>: Send,
BoxRaw<(ArtifactName, &'a Artifact)>: Send,
NodeRef<Owned, ToolName, RegisteredTool<'a>, LeafOrInternal>: Send,
BoxRaw<(ToolName, RegisteredTool<'a>)>: Send,
impl<'a> Sync for Registry<'a>where
RawVecInner: Sync,
NodeRef<Owned, ArtifactName, Artifact, LeafOrInternal>: Sync,
BoxRaw<(ArtifactName, Artifact)>: Sync,
NodeRef<Owned, ReferenceName, ArtifactName, LeafOrInternal>: Sync,
BoxRaw<(ReferenceName, ArtifactName)>: Sync,
NodeRef<Owned, ProfileName, Profile, LeafOrInternal>: Sync,
BoxRaw<(ProfileName, Profile)>: Sync,
Arc<Program>: Sync,
NodeRef<Owned, PluginName, Arc<Plugin>, LeafOrInternal>: Sync,
BoxRaw<(PluginName, Arc<Plugin>)>: Sync,
NodeRef<Owned, ArtifactName, &'a Artifact, LeafOrInternal>: Sync,
BoxRaw<(ArtifactName, &'a Artifact)>: Sync,
NodeRef<Owned, ToolName, RegisteredTool<'a>, LeafOrInternal>: Sync,
BoxRaw<(ToolName, RegisteredTool<'a>)>: Sync,
impl<'a> Unpin for Registry<'a>
impl<'a> UnsafeUnpin for Registry<'a>where
&'a RepoConfig: UnsafeUnpin,
*const LeafNode<ArtifactName, &'a Artifact> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(ArtifactName, &'a Artifact)>>: UnsafeUnpin,
*const LeafNode<ToolName, RegisteredTool<'a>> is !null: UnsafeUnpin,
PhantomData<Box<(ToolName, RegisteredTool<'a>)>>: UnsafeUnpin,
impl<'a> UnwindSafe for Registry<'a>where
&'a RepoConfig: UnwindSafe,
BTreeMap<ArtifactName, &'a Artifact>: UnwindSafe,
BTreeMap<ToolName, RegisteredTool<'a>>: UnwindSafe,
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