pub struct RealtimeRunner { /* private fields */ }realtime only.Expand description
A runner that manages a realtime session with tool execution.
RealtimeRunner provides a high-level interface for:
- Connecting to realtime providers
- Automatically executing tool calls
- Routing events to handlers
- Managing the session lifecycle
§Example
use adk_realtime::{RealtimeRunner, RealtimeConfig, ToolDefinition};
use adk_realtime::openai::OpenAIRealtimeModel;
#[tokio::main]
async fn main() -> Result<()> {
let model = OpenAIRealtimeModel::new(api_key, "gpt-realtime-2.1");
let runner = RealtimeRunner::builder()
.model(Box::new(model))
.instruction("You are a helpful voice assistant.")
.voice("alloy")
.tool_fn(
ToolDefinition::new("get_weather")
.with_description("Get weather for a location"),
|call| {
Ok(serde_json::json!({"temperature": 72, "condition": "sunny"}))
}
)
.build()?;
runner.connect().await?;
runner.run().await?;
Ok(())
}Implementations§
Source§impl RealtimeRunner
impl RealtimeRunner
Sourcepub fn builder() -> RealtimeRunnerBuilder
pub fn builder() -> RealtimeRunnerBuilder
Create a new builder.
Sourcepub fn governance(&self) -> &GovernanceControl
pub fn governance(&self) -> &GovernanceControl
The runner’s kill switch: the control passed to
RealtimeRunnerBuilder::governance, or the one the runner created. While it is
frozen no tool call runs, and the dispatch, and so run, ends with the
governance.frozen error.
§Example
use adk_realtime::RealtimeRunner;
fn stop_all_tools(runner: &RealtimeRunner) {
runner.governance().freeze("incident 4012");
}Sourcepub fn run_config(&self) -> &RunConfig
pub fn run_config(&self) -> &RunConfig
The run config every tool call is governed under: the config passed to
RealtimeRunnerBuilder::tool_governance, or RunConfig::default(), with the
runner’s kill switch among its governance controls.
Sourcepub async fn connect(&self) -> Result<(), RealtimeError>
pub async fn connect(&self) -> Result<(), RealtimeError>
Connect to the realtime provider.
Sourcepub async fn is_connected(&self) -> bool
pub async fn is_connected(&self) -> bool
Check if currently connected.
Sourcepub async fn session_id(&self) -> Option<String>
pub async fn session_id(&self) -> Option<String>
Get the session ID if connected.
Sourcepub async fn send_client_event(
&self,
event: ClientEvent,
) -> Result<(), RealtimeError>
pub async fn send_client_event( &self, event: ClientEvent, ) -> Result<(), RealtimeError>
Send a client event directly to the session.
This method intercepts internal control-plane events (like UpdateSession) to route
them through the provider-agnostic orchestration layer instead of forwarding raw JSON
to the underlying WebSocket transport. This guarantees that adk-realtime never leaks
invalid event payloads to providers (e.g., OpenAI or Gemini) and universally bridges
the Cognitive Handoff mechanics transparently.
Sourcepub async fn update_session(
&self,
config: SessionUpdateConfig,
) -> Result<(), RealtimeError>
pub async fn update_session( &self, config: SessionUpdateConfig, ) -> Result<(), RealtimeError>
Update the session configuration.
Delegates to Self::update_session_with_bridge with no bridge message.
§Example
use adk_realtime::config::{SessionUpdateConfig, RealtimeConfig};
async fn example(runner: &adk_realtime::RealtimeRunner) {
let update = SessionUpdateConfig(
RealtimeConfig::default().with_instruction("You are now a pirate.")
);
runner.update_session(update).await.unwrap();
}Sourcepub async fn update_session_with_bridge(
&self,
config: SessionUpdateConfig,
bridge_message: Option<String>,
) -> Result<(), RealtimeError>
pub async fn update_session_with_bridge( &self, config: SessionUpdateConfig, bridge_message: Option<String>, ) -> Result<(), RealtimeError>
Update the session configuration, optionally injecting a bridge message if a transport resumption (Phantom Reconnect) occurs.
The RealtimeRunner will attempt to mutate the session natively if the underlying API supports it (e.g., OpenAI). If it does not (e.g., Gemini), the Runner will queue a transport resumption, executing it only when the session is in a resumable state (Idle) to prevent data corruption.
The runner keeps only one pending resumption. If a new session update arrives while a resumption is already pending, the previous pending resumption is replaced. This is intentional: pending session updates represent desired end state, not an ordered command queue. The policy is last write wins.
Sourcepub async fn send_audio_chunk(
&self,
audio: &AudioChunk,
) -> Result<(), RealtimeError>
pub async fn send_audio_chunk( &self, audio: &AudioChunk, ) -> Result<(), RealtimeError>
Send a typed raw-audio chunk to the session.
This preserves the audio format at the provider boundary and lets the provider choose its native encoding path. Prefer this method when the caller already owns raw audio bytes.
Sourcepub async fn send_audio(&self, audio_base64: &str) -> Result<(), RealtimeError>
pub async fn send_audio(&self, audio_base64: &str) -> Result<(), RealtimeError>
Send base64-encoded audio to the session.
This compatibility entry point is useful when the caller already has a
base64 payload. Raw-audio callers should use
send_audio_chunk to avoid forcing an encoding
decision at the provider-neutral runner boundary.
Sourcepub async fn send_text(&self, text: &str) -> Result<(), RealtimeError>
pub async fn send_text(&self, text: &str) -> Result<(), RealtimeError>
Send text to the session.
Sourcepub async fn send_video_frame(
&self,
mime_type: &str,
data_base64: &str,
) -> Result<(), RealtimeError>
pub async fn send_video_frame( &self, mime_type: &str, data_base64: &str, ) -> Result<(), RealtimeError>
Send a base64-encoded video/image frame (e.g. image/jpeg) for
multimodal input, where the provider supports it (Gemini Live; OpenAI as
an image-in-context item).
Sourcepub async fn commit_audio(&self) -> Result<(), RealtimeError>
pub async fn commit_audio(&self) -> Result<(), RealtimeError>
Commit the audio buffer (for manual VAD mode).
Sourcepub async fn create_response(&self) -> Result<(), RealtimeError>
pub async fn create_response(&self) -> Result<(), RealtimeError>
Trigger a response from the model.
Sourcepub async fn interrupt(&self) -> Result<(), RealtimeError>
pub async fn interrupt(&self) -> Result<(), RealtimeError>
Interrupt the current response.
Sourcepub async fn disconnect_reason(&self) -> Option<DisconnectReason>
pub async fn disconnect_reason(&self) -> Option<DisconnectReason>
Get the next raw event from the session.
§Example
use adk_realtime::events::ServerEvent;
use tracing::{info, error};
async fn process_events(runner: &adk_realtime::RealtimeRunner) {
while let Some(event) = runner.next_event().await {
match event {
Ok(ServerEvent::SpeechStarted { .. }) => info!("User is speaking"),
Ok(_) => info!("Received other event"),
Err(e) => error!("Error: {e}"),
}
}
}Why the provider ended the stream, once Self::next_event has returned
None.
Callers that poll next_event never see the runner’s on_disconnect
dispatch, so without this a provider that deliberately closed an idle
session is indistinguishable from a dropped socket — and both get
recorded as the same generic stream failure.
pub async fn next_event(&self) -> Option<Result<ServerEvent, RealtimeError>>
Sourcepub async fn send_tool_response(
&self,
response: ToolResponse,
) -> Result<(), RealtimeError>
pub async fn send_tool_response( &self, response: ToolResponse, ) -> Result<(), RealtimeError>
Send a tool response to the session.
§Example
use adk_realtime::events::ToolResponse;
use serde_json::json;
async fn example(runner: &adk_realtime::RealtimeRunner) {
let response = ToolResponse {
call_id: "call_123".to_string(),
output: json!({"temperature": 72}),
};
runner.send_tool_response(response).await.unwrap();
}Sourcepub async fn dispatch_tool_call(
&self,
call_id: &str,
name: &str,
arguments: &str,
) -> Result<(), RealtimeError>
pub async fn dispatch_tool_call( &self, call_id: &str, name: &str, arguments: &str, ) -> Result<(), RealtimeError>
Execute a tool call against the registered handlers, sending the result
back to the model when auto_respond_tools is enabled.
This is the same dispatch the run loop performs for a
response.function_call_arguments.done event, exposed so that callers
driving the session manually via next_event — such
as IntegratedRealtimeRunner (available with the integration feature) —
can execute tools without re-implementing the lookup/respond logic.
Sourcepub async fn send_tool_result(
&self,
call_id: &str,
output: Value,
) -> Result<(), RealtimeError>
pub async fn send_tool_result( &self, call_id: &str, output: Value, ) -> Result<(), RealtimeError>
Sends a tool result the caller produced, honouring auto_respond_tools.
Used by the integration layer, which runs ADK tools through its own policy pipeline and
then needs the result delivered exactly as execute_tool_call would deliver it: the
output is sent now, and the single follow-up create_response is deferred until the
dispatching response closes, so several parallel calls produce one response.
§Example
let result = my_policy_pipeline.run(&call).await?;
runner.send_tool_result(&call.call_id, result).await?;Sourcepub async fn run(&self) -> Result<(), RealtimeError>
pub async fn run(&self) -> Result<(), RealtimeError>
Run the event loop, processing events until disconnected.
Sourcepub async fn instruction(&self) -> Option<String>
pub async fn instruction(&self) -> Option<String>
The system instruction the next connection will use.
Exposed so callers and tests can confirm what context a session was actually created with, rather than inferring it from log lines.
Sourcepub async fn prepend_instruction_context(&self, block: &str)
pub async fn prepend_instruction_context(&self, block: &str)
Prepends a context block to the system instruction before connecting.
The integration layer uses this to carry prior conversation history and recalled memory
into the provider session. Call it before RealtimeRunner::connect: providers read
the instruction at session creation, so a later change needs update_session.
§Example
runner.prepend_instruction_context("Previously discussed: the refund policy.").await;
runner.connect().await?;Sourcepub async fn respond_after_tools(&self) -> Result<(), RealtimeError>
pub async fn respond_after_tools(&self) -> Result<(), RealtimeError>
Trigger the single follow-up response owed after a tool-dispatching turn.
Call this when a response finishes (ResponseDone). If tool output(s)
were sent back during that response (auto_respond_tools), the model now
needs one create_response to speak its answer — issued here, after the
dispatch response is closed and every parallel tool output is in, rather
than once per tool call. Gemini’s create_response is a no-op, so this is
safely uniform across providers. No-op when nothing is pending.
Sourcepub async fn close(&self) -> Result<(), RealtimeError>
pub async fn close(&self) -> Result<(), RealtimeError>
Close the session.
Auto Trait Implementations§
impl !Freeze for RealtimeRunner
impl !RefUnwindSafe for RealtimeRunner
impl !UnwindSafe for RealtimeRunner
impl Forget for RealtimeRunner
impl Move for RealtimeRunner
impl Send for RealtimeRunnerwhere
Arc<dyn RealtimeModel>: Send,
Arc<RwLock<RealtimeConfig>>: Send,
RawTable<(String, (ToolDefinition, Arc<dyn ToolHandler>))>: Send,
Arc<dyn EventHandler>: Send,
Arc<RwLock<Option<Arc<dyn RealtimeSession>>>>: Send,
Arc<RwLock<RunnerState>>: Send,
Atomic<bool>: Send,
Arc<Semaphore>: Send,
Arc<Atomic<usize>>: Send,
Arc<Atomic<bool>>: Send,
RawTable<(String, ToolConfirmationDecision)>: Send,
RawTable<(String, String)>: Send,
Arc<dyn ToolConfirmationHandler>: Send,
Arc<dyn ToolReviewer>: Send,
Arc<dyn RequestedCallSeal>: Send,
RawVecInner: Send,
Arc<dyn Toolset>: Send,
RawTable<(String, usize)>: Send,
Arc<dyn InvocationHooks>: Send,
NodeRef<Owned, UsageUnit, u64, LeafOrInternal>: Send,
BoxRaw<(UsageUnit, u64)>: Send,
Arc<BudgetTracker>: Send,
Arc<dyn ActionLedger>: Send,
Arc<dyn ToolPolicy>: Send,
Arc<ControlState>: Send,
RawTable<(String, ToolApproval)>: Send,
Arc<dyn ApprovalStore>: Send,
Arc<dyn ApprovalService>: Send,
Arc<dyn ConsentStore>: Send,
Arc<dyn SubjectRegistry>: Send,
NodeRef<Owned, String, ConsentPurpose, LeafOrInternal>: Send,
BoxRaw<(String, ConsentPurpose)>: Send,
Arc<dyn Clock>: Send,
Arc<dyn SpendLedger>: Send,
Arc<dyn AuditRecorder>: Send,
NodeRef<Owned, String, AgentPrincipal, LeafOrInternal>: Send,
BoxRaw<(String, AgentPrincipal)>: Send,
RawTable<usize>: Send,
Arc<dyn HistoryCompactor>: Send,
NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send,
BoxRaw<(String, SetValZST)>: Send,
Arc<dyn ToolResultScreen>: Send,
Mutex<Option<ModelSpendHold>>: Send,
impl Sync for RealtimeRunnerwhere
Arc<dyn RealtimeModel>: Sync,
Arc<RwLock<RealtimeConfig>>: Sync,
RawTable<(String, (ToolDefinition, Arc<dyn ToolHandler>))>: Sync,
Arc<dyn EventHandler>: Sync,
Arc<RwLock<Option<Arc<dyn RealtimeSession>>>>: Sync,
Arc<RwLock<RunnerState>>: Sync,
Atomic<bool>: Sync,
Arc<Semaphore>: Sync,
Arc<Atomic<usize>>: Sync,
Arc<Atomic<bool>>: Sync,
RawTable<(String, ToolConfirmationDecision)>: Sync,
RawTable<(String, String)>: Sync,
Arc<dyn ToolConfirmationHandler>: Sync,
Arc<dyn ToolReviewer>: Sync,
Arc<dyn RequestedCallSeal>: Sync,
RawVecInner: Sync,
Arc<dyn Toolset>: Sync,
RawTable<(String, usize)>: Sync,
Arc<dyn InvocationHooks>: Sync,
NodeRef<Owned, UsageUnit, u64, LeafOrInternal>: Sync,
BoxRaw<(UsageUnit, u64)>: Sync,
Arc<BudgetTracker>: Sync,
Arc<dyn ActionLedger>: Sync,
Arc<dyn ToolPolicy>: Sync,
Arc<ControlState>: Sync,
RawTable<(String, ToolApproval)>: Sync,
Arc<dyn ApprovalStore>: Sync,
Arc<dyn ApprovalService>: Sync,
Arc<dyn ConsentStore>: Sync,
Arc<dyn SubjectRegistry>: Sync,
NodeRef<Owned, String, ConsentPurpose, LeafOrInternal>: Sync,
BoxRaw<(String, ConsentPurpose)>: Sync,
Arc<dyn Clock>: Sync,
Arc<dyn SpendLedger>: Sync,
Arc<dyn AuditRecorder>: Sync,
NodeRef<Owned, String, AgentPrincipal, LeafOrInternal>: Sync,
BoxRaw<(String, AgentPrincipal)>: Sync,
RawTable<usize>: Sync,
Arc<dyn HistoryCompactor>: Sync,
NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(String, SetValZST)>: Sync,
Arc<dyn ToolResultScreen>: Sync,
Mutex<Option<ModelSpendHold>>: Sync,
impl Unpin for RealtimeRunnerwhere
Arc<dyn RealtimeModel>: Unpin,
Arc<RwLock<RealtimeConfig>>: Unpin,
*const u8 is !null: Unpin,
Arc<dyn ToolHandler>: Unpin,
Arc<dyn EventHandler>: Unpin,
Arc<RwLock<Option<Arc<dyn RealtimeSession>>>>: Unpin,
Arc<RwLock<RunnerState>>: Unpin,
Align1<u8>: Unpin,
Arc<Semaphore>: Unpin,
Arc<Atomic<usize>>: Unpin,
Arc<Atomic<bool>>: Unpin,
Arc<dyn ToolConfirmationHandler>: Unpin,
Arc<dyn ToolReviewer>: Unpin,
Arc<dyn RequestedCallSeal>: Unpin,
Arc<dyn Toolset>: Unpin,
Arc<dyn InvocationHooks>: Unpin,
*const LeafNode<UsageUnit, u64> is !null: Unpin,
Box<(UsageUnit, u64)>: Unpin,
Arc<BudgetTracker>: Unpin,
Arc<dyn ActionLedger>: Unpin,
Arc<dyn ToolPolicy>: Unpin,
Arc<ControlState>: Unpin,
NonZero<i32>: Unpin,
Utc: Unpin,
Arc<dyn ApprovalStore>: Unpin,
Arc<dyn ApprovalService>: Unpin,
Arc<dyn ConsentStore>: Unpin,
Arc<dyn SubjectRegistry>: Unpin,
*const LeafNode<String, ConsentPurpose> is !null: Unpin,
Box<(String, ConsentPurpose)>: Unpin,
Arc<dyn Clock>: Unpin,
Arc<dyn SpendLedger>: Unpin,
Arc<dyn AuditRecorder>: Unpin,
*const LeafNode<String, AgentPrincipal> is !null: Unpin,
Box<(String, AgentPrincipal)>: Unpin,
Arc<dyn HistoryCompactor>: Unpin,
*const LeafNode<String, SetValZST> is !null: Unpin,
Box<(String, SetValZST)>: Unpin,
Arc<dyn ToolResultScreen>: Unpin,
Align4<u32>: Unpin,
*const Waiter is !null: Unpin,
Align8<usize>: Unpin,
impl UnsafeUnpin for RealtimeRunnerwhere
*const ArcInner<dyn RealtimeModel> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn RealtimeModel>>: UnsafeUnpin,
*const ArcInner<RwLock<RealtimeConfig>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RealtimeConfig>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, (ToolDefinition, Arc<dyn ToolHandler>))>: UnsafeUnpin,
*const ArcInner<dyn EventHandler> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn EventHandler>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<Arc<dyn RealtimeSession>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<Arc<dyn RealtimeSession>>>>>: UnsafeUnpin,
*const ArcInner<RwLock<RunnerState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RunnerState>>>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const ArcInner<Semaphore> is !null: UnsafeUnpin,
PhantomData<ArcInner<Semaphore>>: UnsafeUnpin,
*const ArcInner<Atomic<usize>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<usize>>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
PhantomData<(String, ToolConfirmationDecision)>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
*const ArcInner<dyn ToolConfirmationHandler> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ToolConfirmationHandler>>: UnsafeUnpin,
*const ArcInner<dyn ToolReviewer> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ToolReviewer>>: UnsafeUnpin,
*const ArcInner<dyn RequestedCallSeal> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn RequestedCallSeal>>: UnsafeUnpin,
PhantomData<RuntimeToolset>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, usize)>: UnsafeUnpin,
PhantomData<Arc<dyn InvocationHooks>>: UnsafeUnpin,
*const LeafNode<UsageUnit, u64> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(UsageUnit, u64)>>: UnsafeUnpin,
*const ArcInner<BudgetTracker> is !null: UnsafeUnpin,
PhantomData<ArcInner<BudgetTracker>>: UnsafeUnpin,
*const ArcInner<dyn ActionLedger> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ActionLedger>>: UnsafeUnpin,
*const ArcInner<dyn ToolPolicy> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ToolPolicy>>: UnsafeUnpin,
PhantomData<RuleSet>: UnsafeUnpin,
PhantomData<GovernanceControl>: UnsafeUnpin,
PhantomData<(String, ToolApproval)>: UnsafeUnpin,
*const ArcInner<dyn ApprovalStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ApprovalStore>>: UnsafeUnpin,
*const ArcInner<dyn ApprovalService> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ApprovalService>>: UnsafeUnpin,
*const ArcInner<dyn ConsentStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ConsentStore>>: UnsafeUnpin,
*const ArcInner<dyn SubjectRegistry> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn SubjectRegistry>>: UnsafeUnpin,
*const LeafNode<String, ConsentPurpose> is !null: UnsafeUnpin,
PhantomData<Box<(String, ConsentPurpose)>>: UnsafeUnpin,
*const ArcInner<dyn Clock> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Clock>>: UnsafeUnpin,
*const ArcInner<dyn SpendLedger> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn SpendLedger>>: UnsafeUnpin,
*const ArcInner<dyn AuditRecorder> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AuditRecorder>>: UnsafeUnpin,
*const LeafNode<String, AgentPrincipal> is !null: UnsafeUnpin,
PhantomData<Box<(String, AgentPrincipal)>>: UnsafeUnpin,
PhantomData<SubjectRef>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const ArcInner<dyn HistoryCompactor> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn HistoryCompactor>>: UnsafeUnpin,
*const ArcInner<ControlState> is !null: UnsafeUnpin,
PhantomData<ArcInner<ControlState>>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
*const ArcInner<dyn ToolResultScreen> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ToolResultScreen>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const Waiter is !null: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> ⓘ
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> Pointable for T
impl<T> Pointable for T
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.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.