pub struct Registry<'a> { /* private fields */ }Expand description
Borrows the resolved declarations; discovery and listing never execute owner code. Calls own their temporary directories, leaving the caller’s output root intact.
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 with_sessions(self, sessions: &'a Sessions) -> Self
pub fn list(&self) -> impl Iterator<Item = &ToolDefinition>
Sourcepub fn preflight(&self, name: &str) -> Result<(), String>
pub fn preflight(&self, name: &str) -> Result<(), String>
Resolve static prerequisites without substituting free arguments.
pub async fn call( &self, name: &str, args: Value, output_root: &Path, cancellation: CancellationToken, ) -> ToolResult
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Registry<'a>
impl<'a> !UnwindSafe for Registry<'a>
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,
&'a Sessions: Freeze,
impl<'a> Move for Registry<'a>
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,
&'a Sessions: 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,
NodeRef<Owned, (ArtifactName, ToolFqn), Mutex<Session>, LeafOrInternal>: Sync,
BoxRaw<((ArtifactName, ToolFqn), Mutex<Session>)>: 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,
&'a Sessions: UnsafeUnpin,
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