pub struct AdkError {
pub component: ErrorComponent,
pub category: ErrorCategory,
pub code: &'static str,
pub message: String,
pub retry: RetryHint,
pub details: Box<ErrorDetails>,
/* private fields */
}Expand description
Core traits and types.
Always available regardless of feature flags. Includes:
Agent- The fundamental trait for all agentsTool/Toolset- For extending agents with capabilitiesSession/State- For managing conversation contextEvent- For streaming agent responsesAdkError/Result- Unified error handling Unified structured error type for all ADK-Rust operations.
§Migration from enum syntax
Before (0.4.x enum):
// Construction
Err(AdkError::Model("rate limited".into()))
// Matching
matches!(err, AdkError::Model(_))After (0.5.x struct):
use adk_core::{AdkError, ErrorComponent, ErrorCategory};
// Structured construction
let err = AdkError::new(
ErrorComponent::Model,
ErrorCategory::RateLimited,
"model.openai.rate_limited",
"rate limited",
);
assert!(err.is_retryable()); // RateLimited → should_retry = true
// Backward-compat construction (for migration)
let err = AdkError::model("rate limited");
assert!(err.is_model());Fields§
§component: ErrorComponentThe subsystem that produced the error.
category: ErrorCategoryThe kind of failure.
code: &'static strMachine-readable error code (e.g., “model.openai.rate_limited”).
message: StringHuman-readable error message.
retry: RetryHintRetry guidance for this error.
details: Box<ErrorDetails>Additional structured metadata.
Implementations§
Source§impl AdkError
impl AdkError
Sourcepub fn new(
component: ErrorComponent,
category: ErrorCategory,
code: &'static str,
message: impl Into<String>,
) -> AdkError
Available on crate feature tools only.
pub fn new( component: ErrorComponent, category: ErrorCategory, code: &'static str, message: impl Into<String>, ) -> AdkError
tools only.Creates a new AdkError with the given component, category, code, and message.
Sourcepub fn with_source(self, source: impl Error + Send + Sync + 'static) -> AdkError
Available on crate feature tools only.
pub fn with_source(self, source: impl Error + Send + Sync + 'static) -> AdkError
tools only.Attaches a source error for error chaining.
Sourcepub fn with_retry(self, retry: RetryHint) -> AdkError
Available on crate feature tools only.
pub fn with_retry(self, retry: RetryHint) -> AdkError
tools only.Overrides the default retry hint.
Sourcepub fn with_details(self, details: ErrorDetails) -> AdkError
Available on crate feature tools only.
pub fn with_details(self, details: ErrorDetails) -> AdkError
tools only.Replaces the error details.
Sourcepub fn with_upstream_status(self, status_code: u16) -> AdkError
Available on crate feature tools only.
pub fn with_upstream_status(self, status_code: u16) -> AdkError
tools only.Sets the upstream HTTP status code in details.
Sourcepub fn with_request_id(self, request_id: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn with_request_id(self, request_id: impl Into<String>) -> AdkError
tools only.Sets the upstream request ID in details.
Sourcepub fn with_provider(self, provider: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn with_provider(self, provider: impl Into<String>) -> AdkError
tools only.Sets the provider name in details.
Source§impl AdkError
impl AdkError
Sourcepub fn not_found(
component: ErrorComponent,
code: &'static str,
message: impl Into<String>,
) -> AdkError
Available on crate feature tools only.
pub fn not_found( component: ErrorComponent, code: &'static str, message: impl Into<String>, ) -> AdkError
tools only.Creates a NotFound error for the given component.
Sourcepub fn rate_limited(
component: ErrorComponent,
code: &'static str,
message: impl Into<String>,
) -> AdkError
Available on crate feature tools only.
pub fn rate_limited( component: ErrorComponent, code: &'static str, message: impl Into<String>, ) -> AdkError
tools only.Creates a RateLimited error for the given component.
Available on crate feature tools only.
tools only.Creates an Unauthorized error for the given component.
Sourcepub fn internal(
component: ErrorComponent,
code: &'static str,
message: impl Into<String>,
) -> AdkError
Available on crate feature tools only.
pub fn internal( component: ErrorComponent, code: &'static str, message: impl Into<String>, ) -> AdkError
tools only.Creates an Internal error for the given component.
Sourcepub fn timeout(
component: ErrorComponent,
code: &'static str,
message: impl Into<String>,
) -> AdkError
Available on crate feature tools only.
pub fn timeout( component: ErrorComponent, code: &'static str, message: impl Into<String>, ) -> AdkError
tools only.Creates a Timeout error for the given component.
Available on crate feature tools only.
tools only.Creates an Unavailable error for the given component.
Source§impl AdkError
impl AdkError
Sourcepub fn agent(message: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn agent(message: impl Into<String>) -> AdkError
tools only.Legacy convenience constructor for agent errors.
Sourcepub fn model(message: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn model(message: impl Into<String>) -> AdkError
tools only.Legacy convenience constructor for model errors.
Sourcepub fn tool(message: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn tool(message: impl Into<String>) -> AdkError
tools only.Legacy convenience constructor for tool errors.
Sourcepub fn session(message: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn session(message: impl Into<String>) -> AdkError
tools only.Legacy convenience constructor for session errors.
Sourcepub fn memory(message: impl Into<String>) -> AdkError
Available on crate feature tools only.
pub fn memory(message: impl Into<String>) -> AdkError
tools only.Legacy convenience constructor for memory errors.
Source§impl AdkError
impl AdkError
Sourcepub fn is_agent(&self) -> bool
Available on crate feature tools only.
pub fn is_agent(&self) -> bool
tools only.Returns true if this error originated in agent logic.
Sourcepub fn is_model(&self) -> bool
Available on crate feature tools only.
pub fn is_model(&self) -> bool
tools only.Returns true if this error originated in model interaction.
Sourcepub fn is_tool(&self) -> bool
Available on crate feature tools only.
pub fn is_tool(&self) -> bool
tools only.Returns true if this error originated in tool execution.
Sourcepub fn is_session(&self) -> bool
Available on crate feature tools only.
pub fn is_session(&self) -> bool
tools only.Returns true if this error originated in session management.
Sourcepub fn is_artifact(&self) -> bool
Available on crate feature tools only.
pub fn is_artifact(&self) -> bool
tools only.Returns true if this error originated in artifact storage.
Source§impl AdkError
impl AdkError
Sourcepub fn is_retryable(&self) -> bool
Available on crate feature tools only.
pub fn is_retryable(&self) -> bool
tools only.Returns true if this error should be retried.
Sourcepub fn is_not_found(&self) -> bool
Available on crate feature tools only.
pub fn is_not_found(&self) -> bool
tools only.Returns true if this is a not-found error.
Available on crate feature tools only.
tools only.Returns true if this is an unauthorized error.
Sourcepub fn is_rate_limited(&self) -> bool
Available on crate feature tools only.
pub fn is_rate_limited(&self) -> bool
tools only.Returns true if this is a rate-limited error.
Sourcepub fn is_timeout(&self) -> bool
Available on crate feature tools only.
pub fn is_timeout(&self) -> bool
tools only.Returns true if this is a timeout error.
Sourcepub fn is_conflict(&self) -> bool
Available on crate feature tools only.
pub fn is_conflict(&self) -> bool
tools only.Returns true if the write lost a race or used a stale version.
Sourcepub fn redacted(&self) -> String
Available on crate feature tools only.
pub fn redacted(&self) -> String
tools only.Describes the error by its component, category, and code, without its message.
A message can carry credentials, internal hosts, or upstream response bodies, so this form is what an agent shows a model for a failure whose message stays local. The code is a compile-time constant, never caller data.
§Example
use adk_core::{AdkError, ErrorCategory, ErrorComponent};
let err = AdkError::new(
ErrorComponent::Tool,
ErrorCategory::Unavailable,
"tool.orders_db.unavailable",
"connect postgres://admin:secret@db.internal/prod failed",
);
assert_eq!(err.redacted(), "tool.unavailable (tool.orders_db.unavailable)");Sourcepub fn diagnostics(&self) -> ErrorDiagnostics<'_>
Available on crate feature tools only.
pub fn diagnostics(&self) -> ErrorDiagnostics<'_>
tools only.Describes the error for a log line or span field without its message.
The form is redacted followed by the upstream status, provider,
provider error code, and request ID when they are set. A provider error code or
request ID is shown only when it is a short identifier, since both come from the
upstream response.
§Example
use adk_core::{AdkError, ErrorCategory, ErrorComponent};
let err = AdkError::new(
ErrorComponent::Model,
ErrorCategory::InvalidInput,
"model.gemini.bad_request",
"Invalid value at 'contents[0]' (acct-7731)",
)
.with_upstream_status(400)
.with_provider("gemini");
assert_eq!(
err.diagnostics().to_string(),
"model.invalid_input (model.gemini.bad_request); status 400; provider gemini"
);Trait Implementations§
Source§impl Error for AdkError
impl Error for AdkError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ActionError> for AdkError
impl From<ActionError> for AdkError
Source§fn from(err: ActionError) -> AdkError
fn from(err: ActionError) -> AdkError
Source§impl From<AdkError> for ScriptedResponse
impl From<AdkError> for ScriptedResponse
Source§fn from(error: AdkError) -> ScriptedResponse
fn from(error: AdkError) -> ScriptedResponse
Source§impl From<AdkError> for V1ClientError
impl From<AdkError> for V1ClientError
Source§fn from(source: AdkError) -> V1ClientError
fn from(source: AdkError) -> V1ClientError
Source§impl From<AdkError> for KernelError
impl From<AdkError> for KernelError
Source§fn from(source: AdkError) -> KernelError
fn from(source: AdkError) -> KernelError
Source§impl From<AdkError> for VisionError
impl From<AdkError> for VisionError
Source§fn from(source: AdkError) -> VisionError
fn from(source: AdkError) -> VisionError
Source§impl From<AdkError> for MigrateError
impl From<AdkError> for MigrateError
Source§fn from(error: AdkError) -> MigrateError
fn from(error: AdkError) -> MigrateError
Source§impl From<AdkError> for SurfaceError
impl From<AdkError> for SurfaceError
Source§fn from(source: AdkError) -> SurfaceError
fn from(source: AdkError) -> SurfaceError
Source§impl From<AnthropicApiError> for AdkError
impl From<AnthropicApiError> for AdkError
Source§fn from(err: AnthropicApiError) -> AdkError
fn from(err: AnthropicApiError) -> AdkError
The message quotes at most adk_core::UPSTREAM_EXCERPT_BYTES of the API’s message,
which can echo the request.
Source§impl From<BudgetExceeded> for AdkError
impl From<BudgetExceeded> for AdkError
Source§fn from(exceeded: BudgetExceeded) -> AdkError
fn from(exceeded: BudgetExceeded) -> AdkError
Source§impl From<ComputerUseError> for AdkError
impl From<ComputerUseError> for AdkError
Source§fn from(error: ComputerUseError) -> AdkError
fn from(error: ComputerUseError) -> AdkError
Source§impl From<ConversionError> for AdkError
impl From<ConversionError> for AdkError
Source§fn from(err: ConversionError) -> AdkError
fn from(err: ConversionError) -> AdkError
Source§impl From<DevToolError> for AdkError
The category, code and whether the model sees the message, for each error the model can
act on (spec 3.1 §7.33 fix 6, §10 D9): a rejection’s message reaches the model, so it
learns to read before editing or to give a more specific string; an I/O failure other
than a missing file stays internal and hidden.
impl From<DevToolError> for AdkError
The category, code and whether the model sees the message, for each error the model can act on (spec 3.1 §7.33 fix 6, §10 D9): a rejection’s message reaches the model, so it learns to read before editing or to give a more specific string; an I/O failure other than a missing file stays internal and hidden.
Source§fn from(e: DevToolError) -> AdkError
fn from(e: DevToolError) -> AdkError
Source§impl From<DriverError> for AdkError
impl From<DriverError> for AdkError
Source§fn from(error: DriverError) -> AdkError
fn from(error: DriverError) -> AdkError
Source§impl From<ExecutionError> for AdkError
impl From<ExecutionError> for AdkError
Source§fn from(err: ExecutionError) -> AdkError
fn from(err: ExecutionError) -> AdkError
Source§impl From<GraphError> for AdkError
Converts a graph error into the structured ADK error.
impl From<GraphError> for AdkError
Converts a graph error into the structured ADK error.
A GraphError::AgentFailed becomes the agent’s own error, with the node
named in its message, so its category, code, and retry hint are unchanged.
Every other variant maps to an ErrorComponent::Graph error that carries the
graph error as its source.
Source§fn from(err: GraphError) -> AdkError
fn from(err: GraphError) -> AdkError
Source§impl From<GuardrailError> for AdkError
impl From<GuardrailError> for AdkError
Source§fn from(err: GuardrailError) -> AdkError
fn from(err: GuardrailError) -> AdkError
Source§impl From<IdentityError> for AdkError
An identifier that fails validation becomes session.invalid_identifier
(ErrorCategory::InvalidInput, HTTP 400) in the
Session component, the error every session backend
and the runner return for an invalid app name, user ID, or session ID.
impl From<IdentityError> for AdkError
An identifier that fails validation becomes session.invalid_identifier
(ErrorCategory::InvalidInput, HTTP 400) in the
Session component, the error every session backend
and the runner return for an invalid app name, user ID, or session ID.
§Example
use adk_core::identity::UserId;
use adk_core::{AdkError, ErrorCategory};
let error: AdkError = UserId::try_from("").unwrap_err().into();
assert_eq!(error.code, "session.invalid_identifier");
assert_eq!(error.category, ErrorCategory::InvalidInput);Source§fn from(err: IdentityError) -> AdkError
fn from(err: IdentityError) -> AdkError
Source§impl From<KernelError> for AdkError
impl From<KernelError> for AdkError
Source§fn from(error: KernelError) -> AdkError
fn from(error: KernelError) -> AdkError
Source§impl From<MigrateError> for AdkError
impl From<MigrateError> for AdkError
Source§fn from(error: MigrateError) -> AdkError
fn from(error: MigrateError) -> AdkError
Source§impl From<PaymentsAuthError> for AdkError
impl From<PaymentsAuthError> for AdkError
Source§fn from(value: PaymentsAuthError) -> AdkError
fn from(value: PaymentsAuthError) -> AdkError
Source§impl From<PaymentsKernelError> for AdkError
impl From<PaymentsKernelError> for AdkError
Source§fn from(value: PaymentsKernelError) -> AdkError
fn from(value: PaymentsKernelError) -> AdkError
Source§impl From<PrincipalError> for AdkError
impl From<PrincipalError> for AdkError
Source§fn from(error: PrincipalError) -> AdkError
fn from(error: PrincipalError) -> AdkError
Source§impl From<SandboxError> for AdkError
impl From<SandboxError> for AdkError
Source§fn from(err: SandboxError) -> AdkError
fn from(err: SandboxError) -> AdkError
Source§impl From<ScopeDenied> for AdkError
A scope denial as the tool error a scope-guarded call fails with: component Tool,
category Forbidden, code TOOL_PERMISSION_DENIED_CODE,
and the missing and required scopes in the details’ missingScopes and requiredScopes.
The model is told the call was refused and which scopes were missing (spec 3.1 §7.14).
impl From<ScopeDenied> for AdkError
A scope denial as the tool error a scope-guarded call fails with: component Tool,
category Forbidden, code TOOL_PERMISSION_DENIED_CODE,
and the missing and required scopes in the details’ missingScopes and requiredScopes.
The model is told the call was refused and which scopes were missing (spec 3.1 §7.14).
§Example
use adk_auth::check_scopes;
use adk_core::{AdkError, ErrorCategory, TOOL_PERMISSION_DENIED_CODE};
let denied = check_scopes(&["finance:write"], &[]).unwrap_err();
let error = AdkError::from(denied);
assert_eq!((error.category, error.code), (ErrorCategory::Forbidden, TOOL_PERMISSION_DENIED_CODE));
assert_eq!(error.details.metadata["missingScopes"], serde_json::json!(["finance:write"]));Source§fn from(denied: ScopeDenied) -> AdkError
fn from(denied: ScopeDenied) -> AdkError
Source§fn from(err: SharedStateError) -> AdkError
fn from(err: SharedStateError) -> AdkError
Source§impl From<SkillError> for AdkError
impl From<SkillError> for AdkError
Source§fn from(err: SkillError) -> AdkError
fn from(err: SkillError) -> AdkError
Source§impl From<SpendError> for AdkError
impl From<SpendError> for AdkError
Source§fn from(error: SpendError) -> AdkError
fn from(error: SpendError) -> AdkError
Source§impl From<SurfaceError> for AdkError
impl From<SurfaceError> for AdkError
Source§fn from(error: SurfaceError) -> AdkError
fn from(error: SurfaceError) -> AdkError
Source§impl From<TeamRoleError> for AdkError
impl From<TeamRoleError> for AdkError
Source§fn from(error: TeamRoleError) -> AdkError
fn from(error: TeamRoleError) -> AdkError
Source§impl From<TeamRuntimeError> for AdkError
impl From<TeamRuntimeError> for AdkError
Source§fn from(error: TeamRuntimeError) -> AdkError
fn from(error: TeamRuntimeError) -> AdkError
Source§impl From<TokenError> for AdkError
impl From<TokenError> for AdkError
Source§fn from(err: TokenError) -> AdkError
fn from(err: TokenError) -> AdkError
Source§impl From<VisionError> for AdkError
impl From<VisionError> for AdkError
Source§fn from(err: VisionError) -> AdkError
fn from(err: VisionError) -> AdkError
Source§impl From<WebBotAuthError> for AdkError
impl From<WebBotAuthError> for AdkError
Source§fn from(err: WebBotAuthError) -> AdkError
fn from(err: WebBotAuthError) -> AdkError
Source§impl From<WebhookError> for AdkError
impl From<WebhookError> for AdkError
Source§fn from(error: WebhookError) -> AdkError
fn from(error: WebhookError) -> AdkError
Source§impl From<WorkflowError> for AdkError
impl From<WorkflowError> for AdkError
Source§fn from(error: WorkflowError) -> AdkError
fn from(error: WorkflowError) -> AdkError
Auto Trait Implementations§
impl !RefUnwindSafe for AdkError
impl !UnwindSafe for AdkError
impl Forget for AdkError
impl Freeze for AdkErrorwhere
&'static str: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ErrorDetails is !null: Freeze,
PhantomData<ErrorDetails>: Freeze,
*const dyn Error + Sync + Send is !null: Freeze,
PhantomData<dyn Error + Sync + Send>: Freeze,
impl Move for AdkError
impl Send for AdkError
impl Sync for AdkError
impl Unpin for AdkError
impl UnsafeUnpin for AdkErrorwhere
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ErrorDetails is !null: UnsafeUnpin,
PhantomData<ErrorDetails>: UnsafeUnpin,
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
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.Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more