pub struct CodeActAgentBuilder { /* private fields */ }agents and codeact only.Expand description
Builder for CodeActAgent.
model and runtime are required; every
other setting has a default. The configuration surface mirrors
LlmAgentBuilder (instructions, tools, toolsets,
retries, guardrails, callbacks, transfer, output schema, …).
§Example
use std::sync::Arc;
use std::time::Duration;
use adk_agent::codeact::CodeActAgent;
let agent = CodeActAgent::builder()
.name("assistant")
.model(model)
.runtime(runtime)
.temperature(0.2)
.tool_timeout(Duration::from_secs(30))
.require_tool_confirmation("delete_file")
.build()?;Implementations§
Source§impl CodeActAgentBuilder
impl CodeActAgentBuilder
Sourcepub fn new() -> CodeActAgentBuilder
pub fn new() -> CodeActAgentBuilder
Create a builder with default settings.
Sourcepub fn name(self, name: impl Into<String>) -> CodeActAgentBuilder
pub fn name(self, name: impl Into<String>) -> CodeActAgentBuilder
Set the agent name.
Sourcepub fn description(self, description: impl Into<String>) -> CodeActAgentBuilder
pub fn description(self, description: impl Into<String>) -> CodeActAgentBuilder
Set the agent description.
Sourcepub fn model(self, model: Arc<dyn Llm>) -> CodeActAgentBuilder
pub fn model(self, model: Arc<dyn Llm>) -> CodeActAgentBuilder
Set the model (required).
Sourcepub fn runtime(self, runtime: Arc<dyn CodeRuntime>) -> CodeActAgentBuilder
pub fn runtime(self, runtime: Arc<dyn CodeRuntime>) -> CodeActAgentBuilder
Set the code runtime (required).
Sourcepub fn tool(self, tool: Arc<dyn Tool>) -> CodeActAgentBuilder
pub fn tool(self, tool: Arc<dyn Tool>) -> CodeActAgentBuilder
Register a tool callable from scripts.
Sourcepub fn sub_agent(self, agent: Arc<dyn Agent>) -> CodeActAgentBuilder
pub fn sub_agent(self, agent: Arc<dyn Agent>) -> CodeActAgentBuilder
Add a sub-agent this agent may transfer control to.
When any sub-agent is present (or the Runner supplies transfer targets),
the transfer_to_agent
output is described to the model.
Sourcepub fn toolset(self, toolset: Arc<dyn Toolset>) -> CodeActAgentBuilder
pub fn toolset(self, toolset: Arc<dyn Toolset>) -> CodeActAgentBuilder
Add a toolset whose tools are resolved fresh on each invocation from the
run’s ReadonlyContext (e.g. per-user or pooled tools). Resolved tools
are merged with static tools; duplicate names are rejected at run time.
Sourcepub fn with_skills(self, index: SkillIndex) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skills(self, index: SkillIndex) -> CodeActAgentBuilder
skills only.Set a preloaded skills index. The most relevant skill for each user query is injected into the system prompt.
Sourcepub fn with_auto_skills(self) -> Result<CodeActAgentBuilder, AdkError>
Available on crate feature skills only.
pub fn with_auto_skills(self) -> Result<CodeActAgentBuilder, AdkError>
skills only.Auto-load skills from .skills/ in the current working directory.
§Errors
Returns an error if the skills directory cannot be loaded.
Sourcepub fn with_skills_from_root(
self,
root: impl AsRef<Path>,
) -> Result<CodeActAgentBuilder, AdkError>
Available on crate feature skills only.
pub fn with_skills_from_root( self, root: impl AsRef<Path>, ) -> Result<CodeActAgentBuilder, AdkError>
skills only.Load skills from .skills/ under a custom root directory.
§Errors
Returns an error if the skills directory cannot be loaded.
Sourcepub fn with_skill_policy(self, policy: SelectionPolicy) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skill_policy(self, policy: SelectionPolicy) -> CodeActAgentBuilder
skills only.Customize skill selection behavior.
Sourcepub fn with_skill_budget(self, max_chars: usize) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skill_budget(self, max_chars: usize) -> CodeActAgentBuilder
skills only.Limit injected skill content length (default 2000 chars).
Sourcepub fn disallow_transfer_to_parent(self, disallow: bool) -> CodeActAgentBuilder
pub fn disallow_transfer_to_parent(self, disallow: bool) -> CodeActAgentBuilder
Prevent this agent from transferring control back to its parent.
Applies only to the parent the Runner supplies via
RunConfig::parent_agent; sub-agents are unaffected.
Sourcepub fn disallow_transfer_to_peers(self, disallow: bool) -> CodeActAgentBuilder
pub fn disallow_transfer_to_peers(self, disallow: bool) -> CodeActAgentBuilder
Prevent this agent from transferring control to peer agents.
Applies only to the runner-provided peers in RunConfig::transfer_targets;
sub-agents are unaffected.
Sourcepub fn tool_confirmation_policy(
self,
policy: ToolConfirmationPolicy,
) -> CodeActAgentBuilder
pub fn tool_confirmation_policy( self, policy: ToolConfirmationPolicy, ) -> CodeActAgentBuilder
Set the tool confirmation policy.
Sourcepub fn require_tool_confirmation(
self,
tool_name: impl Into<String>,
) -> CodeActAgentBuilder
pub fn require_tool_confirmation( self, tool_name: impl Into<String>, ) -> CodeActAgentBuilder
Require human confirmation for a specific tool.
Sourcepub fn require_tool_confirmation_for_all(self) -> CodeActAgentBuilder
pub fn require_tool_confirmation_for_all(self) -> CodeActAgentBuilder
Require human confirmation for every tool call.
Sourcepub fn generate_content_config(
self,
config: GenerateContentConfig,
) -> CodeActAgentBuilder
pub fn generate_content_config( self, config: GenerateContentConfig, ) -> CodeActAgentBuilder
Set the generation config (temperature, tokens, etc.) applied to every model request.
Sourcepub fn temperature(self, temperature: f32) -> CodeActAgentBuilder
pub fn temperature(self, temperature: f32) -> CodeActAgentBuilder
Set the default sampling temperature for model requests.
Sourcepub fn top_p(self, top_p: f32) -> CodeActAgentBuilder
pub fn top_p(self, top_p: f32) -> CodeActAgentBuilder
Set the default top-p for model requests.
Sourcepub fn top_k(self, top_k: i32) -> CodeActAgentBuilder
pub fn top_k(self, top_k: i32) -> CodeActAgentBuilder
Set the default top-k for model requests.
Sourcepub fn max_output_tokens(self, max_tokens: i32) -> CodeActAgentBuilder
pub fn max_output_tokens(self, max_tokens: i32) -> CodeActAgentBuilder
Set the default maximum output tokens for model requests.
Sourcepub fn tool_timeout(self, timeout: Duration) -> CodeActAgentBuilder
pub fn tool_timeout(self, timeout: Duration) -> CodeActAgentBuilder
Set the per-tool execution timeout (default: 5 minutes).
Sourcepub fn output_key(self, key: impl Into<String>) -> CodeActAgentBuilder
pub fn output_key(self, key: impl Into<String>) -> CodeActAgentBuilder
Set a session state key under which the final result value is stored.
Sourcepub fn before_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-agent callback.
Callbacks run in registration order before the loop starts; the first to
return Some(content) short-circuits the run with that content.
Sourcepub fn after_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-agent callback.
Callbacks run after the loop completes (not on suspension); the first to
return Some(content) emits that content and wins.
Sourcepub fn before_model_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_model_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-model callback, invoked before each model request.
A callback may rewrite the request
(BeforeModelResult::Continue)
or skip the model call entirely with a synthetic response
(BeforeModelResult::Skip).
Sourcepub fn after_model_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_model_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-model callback, invoked after each model response is
assembled. Returning Some(response) replaces the response the loop uses
to extract the next script.
Sourcepub fn before_tool_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_tool_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-tool callback, invoked before each tool call. The first to
return Some(content) short-circuits the call; that content is converted
to a value and fed back into the script as the tool’s result.
Sourcepub fn after_tool_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_tool_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-tool callback, invoked after each tool attempt resolves. The
first to return Some(content) replaces the result fed back to the script.
Sourcepub fn after_tool_callback_full(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_tool_callback_full( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a rich after-tool callback receiving the tool, arguments, and response
value. Returning Some(value) replaces the result fed back to the script.
These run after the plain after_tool_callback
chain.
Sourcepub fn on_tool_error(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn on_tool_error( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an on-tool-error callback. When a tool ultimately fails, callbacks
run in order; the first to return Some(value) supplies a fallback
result (fed back as if the tool succeeded). If none do, the error is
raised into the script.
Sourcepub fn default_retry_budget(self, budget: RetryBudget) -> CodeActAgentBuilder
pub fn default_retry_budget(self, budget: RetryBudget) -> CodeActAgentBuilder
Set the default retry budget applied to tools without a per-tool override.
Sourcepub fn tool_retry_budget(
self,
tool_name: impl Into<String>,
budget: RetryBudget,
) -> CodeActAgentBuilder
pub fn tool_retry_budget( self, tool_name: impl Into<String>, budget: RetryBudget, ) -> CodeActAgentBuilder
Set a per-tool retry budget override (takes precedence over the default).
Sourcepub fn circuit_breaker_threshold(self, threshold: u32) -> CodeActAgentBuilder
pub fn circuit_breaker_threshold(self, threshold: u32) -> CodeActAgentBuilder
Set the circuit-breaker threshold: after this many consecutive failures in one invocation, a tool is short-circuited with an immediate error until the next run.
Sourcepub fn input_schema(self, schema: Value) -> CodeActAgentBuilder
pub fn input_schema(self, schema: Value) -> CodeActAgentBuilder
Set a JSON schema describing this agent’s input (descriptive metadata, e.g. for exposing the agent as a tool; not enforced at runtime).
Sourcepub fn output_schema(self, schema: Value) -> CodeActAgentBuilder
pub fn output_schema(self, schema: Value) -> CodeActAgentBuilder
Require the final result to validate against this JSON schema. On a
mismatch the model is asked to correct it, up to
output_max_retries times.
Sourcepub fn output_type<T>(self) -> CodeActAgentBuilderwhere
T: JsonSchema,
pub fn output_type<T>(self) -> CodeActAgentBuilderwhere
T: JsonSchema,
Require the final result to match T’s JSON schema. Convenience over
output_schema using schemars.
Sourcepub fn output_max_retries(self, retries: usize) -> CodeActAgentBuilder
pub fn output_max_retries(self, retries: usize) -> CodeActAgentBuilder
Set the maximum number of output-schema correction retries (default 3).
Sourcepub fn input_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
pub fn input_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
Set guardrails applied to the incoming user content before the run. A
block aborts the run; a transform (e.g. PII redaction) rewrites it.
No-op unless the guardrails feature is enabled.
Sourcepub fn output_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
pub fn output_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
Set guardrails applied to the final result before it is emitted.
No-op unless the guardrails feature is enabled.
Sourcepub fn instruction(self, instruction: impl Into<String>) -> CodeActAgentBuilder
pub fn instruction(self, instruction: impl Into<String>) -> CodeActAgentBuilder
Set the agent instruction, placed first in the system prompt. Supports
{state.key} template injection from session state.
Sourcepub fn instruction_provider(
self,
provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn instruction_provider( self, provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Set a dynamic instruction provider evaluated per invocation (takes
precedence over the static instruction).
Sourcepub fn global_instruction(
self,
instruction: impl Into<String>,
) -> CodeActAgentBuilder
pub fn global_instruction( self, instruction: impl Into<String>, ) -> CodeActAgentBuilder
Set a global instruction placed before the agent instruction. Supports
{state.key} template injection.
Sourcepub fn global_instruction_provider(
self,
provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn global_instruction_provider( self, provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Set a dynamic global instruction provider evaluated per invocation (takes
precedence over the static global_instruction).
Sourcepub fn include_contents(self, include: IncludeContents) -> CodeActAgentBuilder
pub fn include_contents(self, include: IncludeContents) -> CodeActAgentBuilder
Control which conversation history the agent sees (default: full).
Sourcepub fn max_iterations(self, max: u32) -> CodeActAgentBuilder
pub fn max_iterations(self, max: u32) -> CodeActAgentBuilder
Set the maximum number of model turns.
Sourcepub fn max_error_chars(self, max: usize) -> CodeActAgentBuilder
pub fn max_error_chars(self, max: usize) -> CodeActAgentBuilder
Set the maximum error-message length fed back to the model.
Sourcepub fn build(self) -> Result<CodeActAgent, AdkError>
pub fn build(self) -> Result<CodeActAgent, AdkError>
Trait Implementations§
Source§impl Default for CodeActAgentBuilder
impl Default for CodeActAgentBuilder
Source§fn default() -> CodeActAgentBuilder
fn default() -> CodeActAgentBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for CodeActAgentBuilder
impl !UnwindSafe for CodeActAgentBuilder
impl Freeze for CodeActAgentBuilder
impl Send for CodeActAgentBuilder
impl Sync for CodeActAgentBuilder
impl Unpin for CodeActAgentBuilder
impl UnsafeUnpin for CodeActAgentBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> ⓘ
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> ⓘ
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 moreimpl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.