pub struct RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
Paths: WorkspacePaths + ?Sized,
Telemetry: TelemetrySink<RegistryEvent> + ?Sized,
Reporter: ErrorReporter + ?Sized,
Formatter: ErrorFormatter + ?Sized,{ /* private fields */ }Expand description
Builder that wires a ToolRegistry using WorkspacePaths, telemetry,
and error-reporting hooks supplied by the caller.
Implementations§
Source§impl<'a, Paths, Telemetry, Reporter, Formatter> RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
Paths: WorkspacePaths + ?Sized,
Telemetry: TelemetrySink<RegistryEvent> + ?Sized,
Reporter: ErrorReporter + ?Sized,
Formatter: ErrorFormatter + ?Sized,
impl<'a, Paths, Telemetry, Reporter, Formatter> RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
Paths: WorkspacePaths + ?Sized,
Telemetry: TelemetrySink<RegistryEvent> + ?Sized,
Reporter: ErrorReporter + ?Sized,
Formatter: ErrorFormatter + ?Sized,
Sourcepub fn new(
workspace_paths: &'a Paths,
telemetry: &'a Telemetry,
error_reporter: &'a Reporter,
error_formatter: &'a Formatter,
) -> Self
pub fn new( workspace_paths: &'a Paths, telemetry: &'a Telemetry, error_reporter: &'a Reporter, error_formatter: &'a Formatter, ) -> Self
Creates a new RegistryBuilder that records events via the provided
telemetry sink and reports errors using the supplied reporter.
Sourcepub fn with_pty_config(self, config: PtyConfig) -> Self
pub fn with_pty_config(self, config: PtyConfig) -> Self
Overrides the PTY configuration applied to the registry.
Sourcepub fn with_policy_manager(self, manager: ToolPolicyManager) -> Self
pub fn with_policy_manager(self, manager: ToolPolicyManager) -> Self
Supplies a pre-built ToolPolicyManager, bypassing policy path resolution.
Sourcepub fn with_policy_path<P>(self, path: P) -> Self
pub fn with_policy_path<P>(self, path: P) -> Self
Overrides the policy configuration path resolved from WorkspacePaths.
Sourcepub async fn build(self) -> Result<ToolRegistry>
pub async fn build(self) -> Result<ToolRegistry>
Builds a ToolRegistry using the configured hooks.
Auto Trait Implementations§
impl<'a, Paths, Telemetry, Reporter, Formatter> !RefUnwindSafe for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>
impl<'a, Paths, Telemetry, Reporter, Formatter> !UnwindSafe for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>
impl<'a, Paths, Telemetry, Reporter, Formatter> Forget for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>
impl<'a, Paths, Telemetry, Reporter, Formatter> Freeze for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
&'a Paths: Freeze,
&'a Telemetry: Freeze,
&'a Reporter: Freeze,
&'a Formatter: Freeze,
Paths: ?Sized,
Telemetry: ?Sized,
Reporter: ?Sized,
Formatter: ?Sized,
impl<'a, Paths, Telemetry, Reporter, Formatter> Move for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>
impl<'a, Paths, Telemetry, Reporter, Formatter> Send for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
&'a Paths: Send,
&'a Telemetry: Send,
&'a Reporter: Send,
&'a Formatter: Send,
Paths: ?Sized,
Telemetry: ?Sized,
Reporter: ?Sized,
Formatter: ?Sized,
impl<'a, Paths, Telemetry, Reporter, Formatter> Sync for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
&'a Paths: Sync,
&'a Telemetry: Sync,
&'a Reporter: Sync,
&'a Formatter: Sync,
Paths: ?Sized,
Telemetry: ?Sized,
Reporter: ?Sized,
Formatter: ?Sized,
impl<'a, Paths, Telemetry, Reporter, Formatter> Unpin for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
&'a Paths: Unpin,
&'a Telemetry: Unpin,
&'a Reporter: Unpin,
&'a Formatter: Unpin,
Paths: ?Sized,
Telemetry: ?Sized,
Reporter: ?Sized,
Formatter: ?Sized,
impl<'a, Paths, Telemetry, Reporter, Formatter> UnsafeUnpin for RegistryBuilder<'a, Paths, Telemetry, Reporter, Formatter>where
&'a Paths: UnsafeUnpin,
&'a Telemetry: UnsafeUnpin,
&'a Reporter: UnsafeUnpin,
&'a Formatter: UnsafeUnpin,
Paths: ?Sized,
Telemetry: ?Sized,
Reporter: ?Sized,
Formatter: ?Sized,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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