pub struct Kernel { /* private fields */ }Expand description
The resident supervisor (spec 3.2 §7.2). Cloning shares the kernel.
§Example
use std::sync::Arc;
use adk_core::InMemoryRunStore;
use adk_kernel::{Kernel, KernelConfig};
let kernel = Kernel::builder()
.config(KernelConfig::default())
.run_store(Arc::new(InMemoryRunStore::new()))
.agent("adk-rust", runner)
.build()?;
kernel.start().await?;
kernel.shutdown_on_signal().await?;Implementations§
Source§impl Kernel
impl Kernel
Sourcepub async fn area_settings(&self, partition: &PartitionId) -> Result<AreaView>
pub async fn area_settings(&self, partition: &PartitionId) -> Result<AreaView>
The settings in force in partition (spec 3.3 §10 K3), as
GET /kernel/settings/{partition} answers them: quiet time, the daily spending limit
with what was spent today, the mode, and whether the primary agent works there.
§Example
use adk_kernel::{Kernel, PartitionId};
let area = kernel.area_settings(&PartitionId::default()).await?;
let left = area.daily_spending_limit.map(|limit| limit.saturating_sub(area.spent_today));§Errors
Returns a store error when the partition table, the control store or the spend totals cannot be read.
Source§impl Kernel
impl Kernel
Sourcepub const SIGTERM_DRAIN: Duration
pub const SIGTERM_DRAIN: Duration
How long shutdown_on_signal drains before it stops.
Sourcepub fn builder() -> KernelBuilder
pub fn builder() -> KernelBuilder
A builder.
Sourcepub fn config(&self) -> &KernelConfig
pub fn config(&self) -> &KernelConfig
The configuration the kernel was built with.
Sourcepub fn store_uses(&self) -> &[StoreUse]
pub fn store_uses(&self) -> &[StoreUse]
Each stateful store of the kernel: where it came from and whether it is known to be
held in memory (spec 3.2 §7.1, KernelBuilder::require_durable).
Sourcepub fn inventory(&self) -> KernelInventory
pub fn inventory(&self) -> KernelInventory
What the kernel runs, and a warning for each thing it would silently not do
(KernelInventory): logged when the kernel starts and served at
GET /api/kernel/inventory.
Sourcepub fn signal_sink(
&self,
partition: impl Into<PartitionId>,
) -> Result<SignalSink>
pub fn signal_sink( &self, partition: impl Into<PartitionId>, ) -> Result<SignalSink>
The sink that files signals in partition (spec 3.5 §7.10; feature charter): on
the kernel’s agenda store, wake router, event bus, clock and audit trail, through the
store KernelBuilder::signals registered for the partition. Each filed or counted
signal wakes the Wake::Signal sleepers and triggers of the partition.
§Errors
Returns KernelError::Config when no signal store is registered for partition.
Sourcepub async fn start(&self) -> Result<()>
pub async fn start(&self) -> Result<()>
Starts the workers, scheduler, wake sources and control plane, after reconciling
the wakes missed while the kernel was down. Records kernel.started.
A mirrored kill switch is read before anything else, for at most
KernelConfig::GOVERNANCE_FIRST_READ, so work spawned once start returns is
decided by the store’s state rather than refused as never read. A store that cannot be
read in that time leaves the control stale: the kernel starts and refuses work until
its mirror reads the store.
Processes a drain parked are woken first, and those a freeze parked when the control allows work again.
§Errors
Returns KernelError::Lifecycle when the kernel already runs,
KernelError::ControlPlane when the socket or bind is taken, or a store error.
Sourcepub async fn pause(&self) -> Result<()>
pub async fn pause(&self) -> Result<()>
Stops claiming; running processes run their attempt to its end. Records
kernel.paused.
§Errors
Returns KernelError::Lifecycle when the kernel is not running.
Sourcepub async fn resume(&self) -> Result<()>
pub async fn resume(&self) -> Result<()>
Claims again after pause or drain, waking the
processes a drain parked. Records kernel.resumed.
§Errors
Returns KernelError::Lifecycle when the kernel is not paused.
Sourcepub async fn drain(&self, timeout: Duration) -> Result<()>
pub async fn drain(&self, timeout: Duration) -> Result<()>
Suspends running processes at their next checkpoint through S1’s suspend path
(Suspension::Drain), then stops claiming; on
timeout aborts the claim loops so their leases lapse. Records kernel.drained.
The kernel is paused afterwards: resume or a later
start wakes what the drain parked.
§Errors
Returns KernelError::Lifecycle when the kernel is not running or paused, or a
store error.
Sourcepub async fn stop(&self) -> Result<()>
pub async fn stop(&self) -> Result<()>
Drains for SIGTERM_DRAIN, unless a drain
already paused the kernel, stops drivers and closes the control plane. Records
kernel.stopped.
§Errors
Returns a store or control-plane error; the kernel is stopped regardless.
Sourcepub async fn shutdown_on_signal(&self) -> Result<()>
pub async fn shutdown_on_signal(&self) -> Result<()>
Waits for SIGTERM or Ctrl-C — or, in a Windows service, the service manager’s stop
(spec 3.2 §10 W3) — then stops, which drains once for
SIGTERM_DRAIN.
§Errors
Returns the error of stop, or KernelError::Io when the signal
handler cannot be installed.
Sourcepub async fn freeze(&self, reason: &str, by: AuditActor) -> Result<()>
pub async fn freeze(&self, reason: &str, by: AuditActor) -> Result<()>
Freezes execution as by: GovernanceControl::freeze_recorded, then the running
processes park Waiting at their next checkpoint with
Suspension::Freeze, one kernel.process.suspended
record each, on every replica within one second (K-I8). No process starts until
unfreeze.
§Errors
Returns the control’s error when the freeze cannot be recorded; this replica is frozen regardless.
Sourcepub async fn unfreeze(&self, by: AuditActor) -> Result<()>
pub async fn unfreeze(&self, by: AuditActor) -> Result<()>
Lifts the freeze as by: GovernanceControl::unfreeze_recorded, then wakes exactly
the processes the freeze parked, never a manual or preempted suspension (K-I21).
§Errors
Returns the control’s error when the unfreeze cannot be recorded; execution stays frozen.
Sourcepub async fn run_now(
&self,
target: RunNowTarget,
request_id: Option<&str>,
by: AuditActor,
) -> Result<RunNow>
pub async fn run_now( &self, target: RunNowTarget, request_id: Option<&str>, by: AuditActor, ) -> Result<RunNow>
Runs a cron sleeper or a standing cron trigger now, outside its schedule, for by.
The run now is a wake like a tick’s: an event keyed keys::run_now that becomes its
kernel.wake run, so a retried request with the same request_id routes once, and the
router wakes the sleeper, or fires the trigger, as a tick would. The woken run passes
admission like any other: quiet hours defer it, a spent budget parks it, a quota holds
it. The schedule is untouched: no watermark moves, the next tick fires as planned, and
a recurring sleeper’s successor sleeps on the same cron wake after the run. The turn
is told it was run now: its wake reason’s payload carries run_now, the expression
and who asked. The call is recorded as kernel.run_now.
A run now of a trigger follows the trigger’s WakeOverlap as a
tick does: while a process the trigger started is unfinished, skip refuses it here,
queueOne queues one behind it or joins the one already waiting, and queue queues
behind it.
| Target | Must be |
|---|---|
RunNowTarget::Process | Waiting, not suspended, its wake set holding a cron wake |
RunNowTarget::Trigger | A standing trigger of this kernel on a cron wake |
§Example
use adk_core::audit_log::AuditActor;
use adk_kernel::{Kernel, RunNowTarget};
let run_now = kernel
.run_now(RunNowTarget::Trigger { name: "nightly-digest".into() }, None, AuditActor::default())
.await?;
println!("queued {}", run_now.key);§Errors
Returns KernelError::Frozen while the kill switch refuses work, so nothing is
queued; KernelError::NotFound or KernelError::InvalidState for a process that
is missing or not asleep on a cron wake; KernelError::Config for a name no cron
trigger has; KernelError::InvalidState, naming the unfinished process, for a
trigger whose overlap is skip; or a store error.
Sourcepub async fn steer(
&self,
user_id: &str,
session_id: &str,
text: &str,
) -> Result<Option<Steering>>
pub async fn steer( &self, user_id: &str, session_id: &str, text: &str, ) -> Result<Option<Steering>>
Sends text to the turn of user_id’s session session_id that this replica runs
(spec 3.3 §6 “steer”): Runner::steer on the runner of the process’s target, so the
message is screened as a turn’s own message is and the agent takes it at its next safe
point.
Returns None when no turn of the session takes messages here: none runs, another
replica runs it, its target is a workflow, or its run has not reached its agent yet.
Send the message as the session’s next message then. An added agent’s turn that
started before the agent was changed finishes on the build it started on, which is no
longer hosted, so it answers None too.
§Errors
Returns KernelError::Frozen while everything is stopped, or the runner’s error
when text is blank or an input guardrail or plugin refuses the message.
§Example
use adk_core::SteerOutcome;
match kernel.steer("ana", "s-1", "use the staging database").await? {
Some(steering) => match steering.receipt.outcome().await? {
SteerOutcome::Delivered { event_id } => println!("delivered as {event_id}"),
SteerOutcome::Returned(_) => println!("send it as the next message"),
},
None => println!("no turn runs here: send it as the next message"),
}Sourcepub fn processes(&self) -> &ProcessTable
pub fn processes(&self) -> &ProcessTable
The process table.
Sourcepub fn subagents(&self) -> Option<&DurableSubagents>
pub fn subagents(&self) -> Option<&DurableSubagents>
The background sub-agent host, when the kernel was built with
KernelBuilder::subagents.
Sourcepub fn partitions(&self) -> &Partitions
pub fn partitions(&self) -> &Partitions
The partition table and its crossings (spec 3.2 §7.8).
Sourcepub fn partition_of_target(&self, target: &str) -> Option<&PartitionId>
pub fn partition_of_target(&self, target: &str) -> Option<&PartitionId>
The partition the target target is bound to, when it is a partition agent’s.
Sourcepub fn agents(&self) -> &Agents
pub fn agents(&self) -> &Agents
The agents a person adds, by asking or by hand (spec 3.3 §5.7, §10 K7): every change to one goes through this table.
Sourcepub fn wake_router(&self) -> &WakeRouter
pub fn wake_router(&self) -> &WakeRouter
The wake matcher.
Sourcepub async fn control_addr(&self) -> Option<SocketAddr>
pub async fn control_addr(&self) -> Option<SocketAddr>
The address the control plane’s HTTP listener is bound to while the kernel runs, so
a bind on port 0 is discoverable (spec 3.2 §7.11, spec 3.5 §8.2); None when the
control plane serves no HTTP or the kernel is not running.
§Example
let control = ControlPlaneConfig::default().without_socket().with_http("127.0.0.1:0".parse()?);
kernel.start().await?;
let addr = kernel.control_addr().await.expect("the control plane listens");Sourcepub fn ledger(&self) -> Option<&Ledger>
pub fn ledger(&self) -> Option<&Ledger>
The content-free activity ledger the kernel writes, when it was built with one
(spec 3.2 §7.10, feature proc).
Sourcepub fn serves_routes(&self) -> bool
pub fn serves_routes(&self) -> bool
Whether control::router built this kernel’s control-plane
routes for a server, so a page served beside them may read them: the web home reads
/api/kernel only then (spec 3.3 §10).
§Example
assert!(!kernel.serves_routes());
let _routes = adk_kernel::control::router(kernel.clone());
assert!(kernel.serves_routes());Sourcepub async fn quiet_until(
&self,
partition: &PartitionId,
at: DateTime<Utc>,
) -> Option<DateTime<Utc>>
pub async fn quiet_until( &self, partition: &PartitionId, at: DateTime<Utc>, ) -> Option<DateTime<Utc>>
The end of the quiet time that holds at in partition, followed through windows
that touch; None when at is not quiet (spec 3.3 §5.4, §10 K3). It reads the
windows in force now: the kernel’s, the proactivity policy’s and the partition’s own,
with a quiet time the person changed while the kernel runs in place of the kernel’s and
the partition’s. A phone’s wake-up waits for it.
§Example
use adk_kernel::PartitionId;
if let Some(until) = kernel.quiet_until(&PartitionId::default(), chrono::Utc::now()).await {
println!("quiet until {until}");
}Sourcepub fn events(&self) -> EventSubscriber
pub fn events(&self) -> EventSubscriber
Subscribes to the event bus from now on.
Sourcepub fn health(&self) -> KernelHealth
pub fn health(&self) -> KernelHealth
The kernel’s health: per worker, scheduler lag, store latency.
Trait Implementations§
Source§impl ChannelHost for Kernel
impl ChannelHost for Kernel
Source§fn quiet_until(&self, at: DateTime<Utc>) -> Option<DateTime<Utc>>
fn quiet_until(&self, at: DateTime<Utc>) -> Option<DateTime<Utc>>
The end of the kernel’s quiet hours and its proactivity policy’s, whichever hold
at, followed through windows that touch: the windows the kernel started with.
Source§fn quiet_ends<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Option<DateTime<Utc>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn quiet_ends<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Option<DateTime<Utc>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The end of the quiet time in force in the decision’s area that holds at: the
person’s window changed while the kernel runs in place of the start ones, beside the
workspace’s (spec 3.3 §10 K3). The area is the partition of the process that holds the
call, else default.
Source§fn moves_money(&self, request: &ApprovalRequest) -> bool
fn moves_money(&self, request: &ApprovalRequest) -> bool
Whether a mounted driver declares the called tool financial (spec 3.2 K-I9); a
name two drivers share counts when either declares it so.
Source§fn rates_high(&self, request: &ApprovalRequest) -> bool
fn rates_high(&self, request: &ApprovalRequest) -> bool
Whether a mounted driver declares the called tool of a class nothing may allow without a person (spec 3.2 K-I9).
Source§fn steer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SteerReceipt>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn steer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SteerReceipt>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Kernel::steer: the turn this replica runs takes the message.
Source§fn finished_turns<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, RunRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finished_turns<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, RunRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The bus’s finished processes whose runs a channel started, read from the run store.
Source§fn approvals(&self) -> Option<Arc<dyn ApprovalService>>
fn approvals(&self) -> Option<Arc<dyn ApprovalService>>
None when the host has none.Source§fn audit_trail(&self) -> Option<AuditTrail>
fn audit_trail(&self) -> Option<AuditTrail>
kernel.channel records go to.Source§fn turn<'life0, 'life1, 'async_trait>(
&'life0 self,
pid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn turn<'life0, 'life1, 'async_trait>(
&'life0 self,
pid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
pid as it stands, wherever it runs: the gateway asks after the
turns it started, so a turn another replica ran still gets its reply. None by
default, for a host whose turns all finish in finished_turns. Read moreSource§fn start_turn<'life0, 'async_trait>(
&'life0 self,
run: NewRun,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_turn<'life0, 'async_trait>(
&'life0 self,
run: NewRun,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
run, a paired account’s turn; a run whose idempotency key was used returns
the process that key started. Returns the process id. Read moreSource§impl FreezeDelegate for Kernel
impl FreezeDelegate for Kernel
Source§fn freeze<'life0, 'life1, 'async_trait>(
&'life0 self,
reason: &'life1 str,
by: AuditActor,
) -> Pin<Box<dyn Future<Output = Result<FreezeReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn freeze<'life0, 'life1, 'async_trait>(
&'life0 self,
reason: &'life1 str,
by: AuditActor,
) -> Pin<Box<dyn Future<Output = Result<FreezeReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
reason as by, stops the running runs, and reports what
happened to them. Read moreSource§fn unfreeze<'life0, 'async_trait>(
&'life0 self,
by: AuditActor,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unfreeze<'life0, 'async_trait>(
&'life0 self,
by: AuditActor,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
by and resumes what the freeze stopped. Read moreSource§fn running_runs(&self) -> RunningRuns
fn running_runs(&self) -> RunningRuns
runningRuns. A delegate parks.Auto Trait Implementations§
impl !RefUnwindSafe for Kernel
impl !UnwindSafe for Kernel
impl Forget for Kernel
impl Freeze for Kernel
impl Move for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernelwhere
*const ArcInner<KernelInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<KernelInner>>: UnsafeUnpin,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§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<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.