pub struct AgentBuilder { /* private fields */ }Expand description
Copy-on-write immutable builder for agent construction.
Every setter returns a new AgentBuilder, leaving the original unchanged.
This makes builders safe to share as templates.
§Basic Usage
use gemini_adk_fluent_rs::builder::AgentBuilder;
use gemini_genai_rs::prelude::ModelId;
let agent = AgentBuilder::new("analyst")
.model(ModelId::LIVE_2_5_FLASH_NATIVE_AUDIO)
.instruction("Analyze the given topic")
.temperature(0.3);
assert_eq!(agent.name(), "analyst");
assert_eq!(agent.get_temperature(), Some(0.3));§Copy-on-Write Pattern
Cloning a builder and modifying the clone leaves the original unchanged. This is useful for creating template builders with shared defaults.
use gemini_adk_fluent_rs::builder::AgentBuilder;
let base = AgentBuilder::new("researcher")
.instruction("You are a research assistant.")
.temperature(0.5);
let creative = base.clone().temperature(0.9);
let precise = base.clone().temperature(0.1);
// Original unchanged
assert_eq!(base.get_temperature(), Some(0.5));
assert_eq!(creative.get_temperature(), Some(0.9));
assert_eq!(precise.get_temperature(), Some(0.1));§Sampling Parameters
use gemini_adk_fluent_rs::builder::AgentBuilder;
let agent = AgentBuilder::new("sampler")
.temperature(0.7)
.top_p(0.95)
.top_k(40)
.max_output_tokens(4096);
assert_eq!(agent.get_top_p(), Some(0.95));
assert_eq!(agent.get_top_k(), Some(40));
assert_eq!(agent.get_max_output_tokens(), Some(4096));§Built-in Tools
use gemini_adk_fluent_rs::builder::AgentBuilder;
let agent = AgentBuilder::new("searcher")
.google_search()
.code_execution()
.url_context();
assert_eq!(agent.tool_count(), 3);§Thinking Budget
use gemini_adk_fluent_rs::builder::AgentBuilder;
let agent = AgentBuilder::new("thinker")
.thinking(2048);
assert_eq!(agent.get_thinking_budget(), Some(2048));Implementations§
Source§impl AgentBuilder
impl AgentBuilder
Sourcepub fn get_instruction(&self) -> Option<&str>
pub fn get_instruction(&self) -> Option<&str>
Configured instruction, if any.
Sourcepub fn get_temperature(&self) -> Option<f32>
pub fn get_temperature(&self) -> Option<f32>
Configured temperature, if any.
Sourcepub fn is_text_only(&self) -> bool
pub fn is_text_only(&self) -> bool
Whether text-only mode is set.
Sourcepub fn get_thinking_budget(&self) -> Option<u32>
pub fn get_thinking_budget(&self) -> Option<u32>
Configured thinking budget, if any.
Sourcepub fn get_writes(&self) -> &[String]
pub fn get_writes(&self) -> &[String]
State keys this agent writes.
Sourcepub fn get_sub_agents(&self) -> &[AgentBuilder]
pub fn get_sub_agents(&self) -> &[AgentBuilder]
Sub-agents registered.
Sourcepub fn is_isolated(&self) -> bool
pub fn is_isolated(&self) -> bool
Whether agent runs in isolated state.
Sourcepub fn tool_count(&self) -> usize
pub fn tool_count(&self) -> usize
Number of tool entries.
Sourcepub fn get_max_output_tokens(&self) -> Option<u32>
pub fn get_max_output_tokens(&self) -> Option<u32>
Configured max_output_tokens, if any.
Sourcepub fn get_stop_sequences(&self) -> &[String]
pub fn get_stop_sequences(&self) -> &[String]
Configured stop sequences.
Sourcepub fn get_description(&self) -> Option<&str>
pub fn get_description(&self) -> Option<&str>
Configured description, if any.
Sourcepub fn get_output_schema(&self) -> Option<&Value>
pub fn get_output_schema(&self) -> Option<&Value>
Configured output schema, if any.
Sourcepub fn get_output_key(&self) -> Option<&str>
pub fn get_output_key(&self) -> Option<&str>
Get the configured output key.
Sourcepub fn get_transfer_to(&self) -> Option<&str>
pub fn get_transfer_to(&self) -> Option<&str>
Configured transfer target agent, if any.
Sourcepub fn middleware_layer_count(&self) -> usize
pub fn middleware_layer_count(&self) -> usize
Number of registered middleware layers.
Sourcepub fn instruction(self, inst: impl Into<String>) -> Self
pub fn instruction(self, inst: impl Into<String>) -> Self
Set the system instruction.
Sourcepub fn instruction_provider(
self,
provider: impl InstructionProvider + 'static,
) -> Self
pub fn instruction_provider( self, provider: impl InstructionProvider + 'static, ) -> Self
Set a dynamic instruction source — any Fn(&State) -> String
closure or a TemplateInstruction (feature templates), resolved
against live session state at the start of every run. Wins over
instruction when both are set.
Sourcepub fn llm_provider(
self,
provider: impl Fn(&State) -> Arc<dyn BaseLlm> + Send + Sync + 'static,
) -> Self
pub fn llm_provider( self, provider: impl Fn(&State) -> Arc<dyn BaseLlm> + Send + Sync + 'static, ) -> Self
Set a dynamic model source, resolved against session state at the start of every run — risk-based escalation to a stronger model, cost routing to a cheaper one, per-tenant model selection — without rebuilding the agent. Wins over the constructor’s model when set.
Sourcepub fn temperature(self, t: f32) -> Self
pub fn temperature(self, t: f32) -> Self
Set the temperature.
Sourcepub fn response_modalities(self, modalities: Vec<Modality>) -> Self
pub fn response_modalities(self, modalities: Vec<Modality>) -> Self
Set response modalities explicitly.
Sourcepub fn url_context(self) -> Self
pub fn url_context(self) -> Self
Add a built-in URL context tool.
Sourcepub fn google_search(self) -> Self
pub fn google_search(self) -> Self
Add a built-in Google Search tool.
Sourcepub fn code_execution(self) -> Self
pub fn code_execution(self) -> Self
Add a built-in code execution tool.
Sourcepub fn artifacts(self, artifacts: impl Into<ArtifactComposite>) -> Self
pub fn artifacts(self, artifacts: impl Into<ArtifactComposite>) -> Self
Declare the artifacts this agent consumes and produces, from the A
namespace: A::text_input(..) + A::json_output(..).
Each input is a read and each output a write of the state key
artifact:{name}, so check_contracts
reports an artifact input no agent produces, or one produced twice,
exactly as it does for state keys.
Sourcepub fn sub_agent(self, agent: AgentBuilder) -> Self
pub fn sub_agent(self, agent: AgentBuilder) -> Self
Add a sub-agent for transfer.
Sourcepub fn max_output_tokens(self, n: u32) -> Self
pub fn max_output_tokens(self, n: u32) -> Self
Set maximum output tokens.
Sourcepub fn stop_sequences(self, seqs: Vec<String>) -> Self
pub fn stop_sequences(self, seqs: Vec<String>) -> Self
Set stop sequences.
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set a description for this agent (used in tool/agent metadata).
Sourcepub fn output_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
Set a JSON schema for structured output.
Sourcepub fn output<T: JsonSchema>(self) -> Self
pub fn output<T: JsonSchema>(self) -> Self
Constrain every reply to JSON shaped like T, using T’s schema.
Read the reply back with RunResult::parse,
or ask for a T directly with
TextAgent::ask_as, which also
repairs a reply that does not parse.
Sourcepub fn output_key(self, key: impl Into<String>) -> Self
pub fn output_key(self, key: impl Into<String>) -> Self
Set the output key — agent’s final text response is auto-saved to this state key.
Sourcepub fn transfer_to(self, agent_name: impl Into<String>) -> Self
pub fn transfer_to(self, agent_name: impl Into<String>) -> Self
Set a default transfer target agent.
Sourcepub fn instruct(self, inst: impl Into<String>) -> Self
👎Deprecated since 2.1.0: use instruction
pub fn instruct(self, inst: impl Into<String>) -> Self
use instruction
Alias for instruction — matches upstream Python Agent.instruct().
Sourcepub fn describe(self, desc: impl Into<String>) -> Self
👎Deprecated since 2.1.0: use description
pub fn describe(self, desc: impl Into<String>) -> Self
use description
Alias for description — matches upstream Python Agent.describe().
Sourcepub fn tool(self, f: impl ToolFunction + 'static) -> Self
pub fn tool(self, f: impl ToolFunction + 'static) -> Self
Register one tool: anything that implements ToolFunction — a
SimpleTool/TypedTool, the value a #[tool] function returns, or an
Arc<dyn ToolFunction> you already hold.
#[tool("Get the weather for a city")]
async fn get_weather(city: String) -> Result<serde_json::Value, ToolError> {
Ok(serde_json::json!({"city": city, "temp": 22}))
}
let agent = AgentBuilder::new("assistant").tool(get_weather());Sourcepub fn tools(self, tools: impl Into<ToolComposite>) -> Self
pub fn tools(self, tools: impl Into<ToolComposite>) -> Self
Register tools: a +-combined ToolComposite from the T
namespace, or a single ToolFunction.
T::mcp(..) needs an async connection that this synchronous builder
cannot perform; it is rejected by build with a
ConfigError — attach MCP toolsets to a Live session instead.
let tools = T::simple("greet", "Greet", |_| async { Ok(json!({})) })
+ T::google_search();
AgentBuilder::new("assistant").tools(tools);Sourcepub fn guard(self, guard: impl Into<GuardComposite>) -> Self
pub fn guard(self, guard: impl Into<GuardComposite>) -> Self
Attach output guards. Each model response is validated against every
guard; if any rejects the output the agent run fails with an
AgentError listing the violations.
Accepts a single guard or a +-combined GuardComposite (every
guard must pass):
AgentBuilder::new("writer").guard(G::pii() + G::length(1, 2000));The guards are installed as an after_model middleware layer, so they
accumulate with .middleware(...) and honor copy-on-write.
Sourcepub fn context(self, policy: impl Into<ContextComposite>) -> Self
pub fn context(self, policy: impl Into<ContextComposite>) -> Self
Attach a context policy that rewrites conversation history before each model call (e.g. windowing, role filtering, tool-result exclusion).
Accepts a single policy or a >>-chained ContextComposite (applied
in order):
AgentBuilder::new("chat").context(C::window(10) >> C::user_only());The policy is installed as a transform_request middleware layer.
Sourcepub fn no_peers(self) -> Self
👎Deprecated since 2.1.0: use isolate, which this has always called
pub fn no_peers(self) -> Self
use isolate, which this has always called
Disallow transfer to peer agents.
Sourcepub fn middleware(self, middleware: impl Into<MiddlewareComposite>) -> Self
pub fn middleware(self, middleware: impl Into<MiddlewareComposite>) -> Self
Attach middleware — a >>-stacked MiddlewareComposite from the
M namespace or a single Arc<dyn Middleware>. All layers are
installed on the compiled LlmTextAgent in the order given.
Multiple calls to .middleware() accumulate: the new layers are
appended after any previously registered layers, preserving the
copy-on-write contract.
let agent = AgentBuilder::new("analyst")
.instruction("Analyze topics")
.middleware(M::log() >> M::latency());Sourcepub fn confirmation_provider(
self,
provider: Arc<dyn ConfirmationProvider>,
) -> Self
pub fn confirmation_provider( self, provider: Arc<dyn ConfirmationProvider>, ) -> Self
Gate T::confirm(..) tools behind a confirmation provider, as
Live::confirmation_provider
does for a session.
A declined call returns ToolError::Declined
with the reason to the model instead of running the tool. An agent with
a confirmation-gated tool and no provider does not build.
Sourcepub fn build(
self,
llm: impl BaseLlm + 'static,
) -> Result<Arc<dyn TextAgent>, ConfigError>
pub fn build( self, llm: impl BaseLlm + 'static, ) -> Result<Arc<dyn TextAgent>, ConfigError>
Compile this builder into an executable TextAgent.
llm is any BaseLlm. Every setting reaches the requests the agent
sends: model, instruction, sampling (temperature, top_p, top_k,
max_output_tokens, stop_sequences), thinking, output_schema,
built-in tools and function tools, middleware, and output_key.
writes, reads and description are declarations for
check_contracts and tool metadata.
Fails with a ConfigError listing every setting a text agent cannot
honour, rather than dropping it: voice, audio modalities, a Live
model, agent-transfer settings (sub_agent, transfer_to, stay,
isolate), an MCP toolset (T::mcp), which needs the async connect
only a Live session performs, and a T::confirm tool with no
confirmation_provider.
let llm = Arc::new(GeminiLlm::new(GeminiLlmParams::default()));
let agent = AgentBuilder::new("analyst")
.instruction("Analyze the topic")
.temperature(0.3)
.build(llm)?;
let state = State::new();
let result = agent.run(&state).await?;Trait Implementations§
Source§impl BitOr for AgentBuilder
AgentBuilder | AgentBuilder → FanOut
impl BitOr for AgentBuilder
AgentBuilder | AgentBuilder → FanOut
Source§type Output = Composable
type Output = Composable
| operator.Source§impl BitOr<AgentBuilder> for Composable
Composable | AgentBuilder → FanOut (flattening)
impl BitOr<AgentBuilder> for Composable
Composable | AgentBuilder → FanOut (flattening)
Source§type Output = Composable
type Output = Composable
| operator.Source§impl Clone for AgentBuilder
impl Clone for AgentBuilder
Source§fn clone(&self) -> AgentBuilder
fn clone(&self) -> AgentBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentBuilder
impl Debug for AgentBuilder
Source§impl Div for AgentBuilder
AgentBuilder / AgentBuilder → Fallback
impl Div for AgentBuilder
AgentBuilder / AgentBuilder → Fallback
Source§type Output = Composable
type Output = Composable
/ operator.Source§impl Div<AgentBuilder> for Composable
Composable / AgentBuilder → Fallback (flattening)
impl Div<AgentBuilder> for Composable
Composable / AgentBuilder → Fallback (flattening)
Source§type Output = Composable
type Output = Composable
/ operator.Source§impl From<AgentBuilder> for Composable
impl From<AgentBuilder> for Composable
Source§fn from(b: AgentBuilder) -> Self
fn from(b: AgentBuilder) -> Self
Source§impl Mul<LoopPredicate> for AgentBuilder
AgentBuilder * until(pred) → conditional Loop
impl Mul<LoopPredicate> for AgentBuilder
AgentBuilder * until(pred) → conditional Loop
Source§type Output = Composable
type Output = Composable
* operator.Source§impl Mul<u32> for AgentBuilder
AgentBuilder * 3 → Loop(max=3)
impl Mul<u32> for AgentBuilder
AgentBuilder * 3 → Loop(max=3)
Source§impl Shr for AgentBuilder
AgentBuilder >> AgentBuilder → Pipeline
impl Shr for AgentBuilder
AgentBuilder >> AgentBuilder → Pipeline
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<AgentBuilder> for StateTransform
A state transform as a pipeline step: a >> S::pick(..) >> b.
impl Shr<AgentBuilder> for StateTransform
A state transform as a pipeline step: a >> S::pick(..) >> b.
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<AgentBuilder> for StateComposite
A state transform as a pipeline step: a >> S::pick(..) >> b.
impl Shr<AgentBuilder> for StateComposite
A state transform as a pipeline step: a >> S::pick(..) >> b.
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<AgentBuilder> for Composable
Composable >> AgentBuilder → Pipeline (flattening)
impl Shr<AgentBuilder> for Composable
Composable >> AgentBuilder → Pipeline (flattening)
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<Composable> for AgentBuilder
AgentBuilder >> Composable → Pipeline (flattening)
impl Shr<Composable> for AgentBuilder
AgentBuilder >> Composable → Pipeline (flattening)
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<StateComposite> for AgentBuilder
A state transform as a pipeline step: a >> S::pick(..) >> b.
impl Shr<StateComposite> for AgentBuilder
A state transform as a pipeline step: a >> S::pick(..) >> b.
Source§type Output = Composable
type Output = Composable
>> operator.Source§impl Shr<StateTransform> for AgentBuilder
A state transform as a pipeline step: a >> S::pick(..) >> b.
impl Shr<StateTransform> for AgentBuilder
A state transform as a pipeline step: a >> S::pick(..) >> b.
Source§type Output = Composable
type Output = Composable
>> operator.Auto Trait Implementations§
impl !RefUnwindSafe for AgentBuilder
impl !UnwindSafe for AgentBuilder
impl Freeze for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.