Skip to main content

KernelStores

Struct KernelStores 

Source
#[non_exhaustive]
pub struct KernelStores {
Show 17 fields pub runs: Arc<dyn DurableRunStore>, pub processes: Arc<dyn ProcessStore>, pub schedules: Arc<dyn ScheduleStore>, pub approvals: Arc<dyn ApprovalStore>, pub actions: Arc<dyn ActionLedger>, pub spend: Arc<dyn SpendLedger>, pub governance: Arc<dyn GovernanceStateStore>, pub agenda: Arc<dyn AgendaStore>, pub partitions: Arc<dyn PartitionStore>, pub watermarks: Arc<dyn CronWatermarkStore>, pub agents: Arc<dyn AgentStore>, pub devices: Arc<dyn DeviceStore>, pub control: Arc<dyn ControlStore>, pub drivers: Arc<dyn DriverStore>, pub ledger: Arc<dyn LedgerStore>, pub channel_bindings: Arc<dyn ChannelBindingStore>, pub charter: CharterStores, /* private fields */
}
Expand description

Every stateful store a kernel keeps, opened together on one backend (spec 3.2 §7.1, §13 Q8): the bundle KernelBuilder::stores and TenantKernelBuilder::stores (feature managed) take, so a host opens one value instead of assembling each store, and a kernel never keeps a store in memory by accident.

FieldStoreBackends
runs, schedules, approvals, actions, spend, governanceadk-session’s run, schedule, approval, action-ledger, spend-ledger and kill-switch storesevery backend
processes, agenda, partitions, watermarks, agentsthe process side table, the agenda, the partition table, cron watermarks, added agentsevery backend
drivers (feature drivers), ledger (feature proc)mounted drivers, the activity ledgerevery backend
devices, control, channel_bindings (feature channels)paired devices, settings and “While you were away” cursors, paired chat accountsin-memory, SQLite, PostgreSQL, Redis
charter (feature charter)charters, KPIs, autonomy, signals (CharterStores)in-memory, SQLite, PostgreSQL, Redis

A store with no backend on the bundle’s backend is kept in memory and named by in_memory_stores, as every store of in_memory is; KernelBuilder::require_durable refuses a kernel that would use one. The record describes the bundle as it was opened: a field replaced afterwards keeps its entry.

open takes the store URLs the rest of ADK-Rust takes:

URLBackendFeature
memory:in_memory—
sqlite://<path>?mode=rwcSQLite, one poolsqlite (default)
postgres://…, postgresql://…PostgreSQL, one poolpostgres
redis://…, rediss://…Redis, one clientredis
mongodb://…/<database>, mongodb+srv://… (database adk when the path is empty)MongoDBmongodb
neo4j://<user>:<password>@<host>, neo4j+s://…, bolt://…, bolt+s://…Neo4jneo4j
firestore://<project>Firestore, with Application Default Credentialsfirestore

§Example

use adk_kernel::stores::KernelStores;

let memory = KernelStores::in_memory();
assert!(memory.is_in_memory("processes"));
assert!(!memory.is_durable());

let dir = tempfile::tempdir()?;
let url = format!("sqlite://{}?mode=rwc", dir.path().join("kernel.db").display());
let sqlite = KernelStores::open(&url).await?;
assert!(sqlite.is_durable());
assert_eq!(sqlite.label(), url);

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§runs: Arc<dyn DurableRunStore>

The durable runs every process lives in.

§processes: Arc<dyn ProcessStore>

The process side table: wake sets, admission deferrals, suspensions and daily spend totals, which the wake router finds sleepers through.

§schedules: Arc<dyn ScheduleStore>

The schedules the kernel’s scheduler fires.

§approvals: Arc<dyn ApprovalStore>

Held calls and approval requests, for the approval service the host builds over it.

§actions: Arc<dyn ActionLedger>

Exactly-once records of non-idempotent calls (K-I4).

§spend: Arc<dyn SpendLedger>

Committed and reserved spend.

§governance: Arc<dyn GovernanceStateStore>

The kill switch’s shared state, which KernelConfig::mirrored_governance mirrors.

§agenda: Arc<dyn AgendaStore>

The agenda (spec 3.2 §7.5).

§partitions: Arc<dyn PartitionStore>

The partition table and the crossing ledger (spec 3.2 §7.8).

§watermarks: Arc<dyn CronWatermarkStore>

Where each cron wake source left off (spec 3.2 §7.4).

§agents: Arc<dyn AgentStore>

The agents a person added (spec 3.3 §5.7).

§devices: Arc<dyn DeviceStore>

Paired devices and their waiting codes, hashed (spec 3.3 §10 K2).

§control: Arc<dyn ControlStore>

Settings changed while the kernel runs and each device’s place in “While you were away” (spec 3.3 §10 K3, K4).

§drivers: Arc<dyn DriverStore>

Mounted drivers and their parked calls (spec 3.2 §7.7).

§ledger: Arc<dyn LedgerStore>

The content-free activity ledger (spec 3.2 §7.10).

§channel_bindings: Arc<dyn ChannelBindingStore>

Chat accounts paired to the owner and staff (spec 3.3 §10 K1).

§charter: CharterStores

Charters, KPIs, autonomy and signals (spec 3.5 §7.10, §7.11).

Implementations§

Source§

impl KernelStores

Source

pub const STORES: &'static [&'static str]

The name of every store of a bundle, as in_memory_stores names them.

Source

pub fn in_memory() -> Self

Every store in memory: nothing outlives the process, and KernelBuilder::require_durable refuses it. Its label is memory.

Source

pub async fn open(url: &str) -> Result<Self>

Opens and migrates every store at url (see the type’s URL table); the label is the URL with its password redacted.

§Errors

Returns KernelError::Config for a URL with no scheme, an unknown one, or one whose feature this build does not include, naming the feature; and KernelError::Store when the backend cannot be reached or migrated.

Source

pub async fn from_sqlite_pool(pool: SqlitePool) -> Result<Self>

Every store on pool, each with its own migration table, such as the pool of harness.db (spec 3.2 §7.1, §13 Q8). The label is sqlite.

§Errors

Returns the error of a migration that fails.

Source

pub async fn from_postgres_pool(pool: PgPool) -> Result<Self>

Every store on pool, each with its own migration table: the database every replica shares (spec 3.2 §13 Q8). The label is postgres.

§Errors

Returns the error of a migration that fails.

Source

pub async fn from_redis_client(client: Client) -> Result<Self>

Every store on client, an initialised Redis client every replica shares (spec 3.2 §13 Q8). The label is redis.

§Errors

Returns the error of a migration that fails.

Source

pub async fn from_mongo_database(db: Database) -> Result<Self>

Every store on db (spec 3.2 §13 Q8). Devices, control settings, chat pairings and the charter stores have no MongoDB backend: they are kept in memory and named by in_memory_stores. The label is mongodb.

§Errors

Returns the error of a migration that fails.

Source

pub async fn from_firestore_db(db: FirestoreDb) -> Result<Self>

Every store on db (spec 3.2 §13 Q8). Devices, control settings, chat pairings and the charter stores have no Firestore backend: they are kept in memory and named by in_memory_stores. The label is firestore.

§Errors

Returns the error of a migration that fails.

Source

pub async fn from_neo4j_graph(graph: Graph) -> Result<Self>

Every store on graph (spec 3.2 §13 Q8). Devices, control settings, chat pairings and the charter stores have no Neo4j backend: they are kept in memory and named by in_memory_stores. The label is neo4j.

§Errors

Returns the error of a migration that fails.

Source

pub fn with_label(self, label: impl Into<String>) -> Self

Names the bundle label in logs, errors and the kernel’s inventory, such as harness.db or a store URL with its password redacted.

Source

pub fn label(&self) -> &str

The bundle’s name: memory, the backend, or the label it was given.

Source

pub fn in_memory_stores(&self) -> Vec<&'static str>

The stores kept in memory, by name (STORES): every store of in_memory, and the stores the bundle’s backend has none of.

Source

pub fn is_in_memory(&self, name: &str) -> bool

Whether the store name (STORES) is kept in memory.

Source

pub fn is_durable(&self) -> bool

Whether every store outlives the process.

Trait Implementations§

Source§

impl Clone for KernelStores

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KernelStores

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for KernelStores

§

impl !UnwindSafe for KernelStores

§

impl Forget for KernelStores

§

impl Freeze for KernelStores
where *const ArcInner<dyn DurableRunStore> is !null: Freeze, PhantomData<ArcInner<dyn DurableRunStore>>: Freeze, *const ArcInner<dyn ProcessStore> is !null: Freeze, PhantomData<ArcInner<dyn ProcessStore>>: Freeze, *const ArcInner<dyn ScheduleStore> is !null: Freeze, PhantomData<ArcInner<dyn ScheduleStore>>: Freeze, *const ArcInner<dyn ApprovalStore> is !null: Freeze, PhantomData<ArcInner<dyn ApprovalStore>>: Freeze, *const ArcInner<dyn ActionLedger> is !null: Freeze, PhantomData<ArcInner<dyn ActionLedger>>: Freeze, *const ArcInner<dyn SpendLedger> is !null: Freeze, PhantomData<ArcInner<dyn SpendLedger>>: Freeze, *const ArcInner<dyn GovernanceStateStore> is !null: Freeze, PhantomData<ArcInner<dyn GovernanceStateStore>>: Freeze, *const ArcInner<dyn AgendaStore> is !null: Freeze, PhantomData<ArcInner<dyn AgendaStore>>: Freeze, *const ArcInner<dyn PartitionStore> is !null: Freeze, PhantomData<ArcInner<dyn PartitionStore>>: Freeze, *const ArcInner<dyn CronWatermarkStore> is !null: Freeze, PhantomData<ArcInner<dyn CronWatermarkStore>>: Freeze, *const ArcInner<dyn AgentStore> is !null: Freeze, PhantomData<ArcInner<dyn AgentStore>>: Freeze, *const ArcInner<dyn DeviceStore> is !null: Freeze, PhantomData<ArcInner<dyn DeviceStore>>: Freeze, *const ArcInner<dyn ControlStore> is !null: Freeze, PhantomData<ArcInner<dyn ControlStore>>: Freeze, *const ArcInner<dyn DriverStore> is !null: Freeze, PhantomData<ArcInner<dyn DriverStore>>: Freeze, *const ArcInner<dyn LedgerStore> is !null: Freeze, PhantomData<ArcInner<dyn LedgerStore>>: Freeze, *const ArcInner<dyn ChannelBindingStore> is !null: Freeze, PhantomData<ArcInner<dyn ChannelBindingStore>>: Freeze, *const ArcInner<dyn CharterStore> is !null: Freeze, PhantomData<ArcInner<dyn CharterStore>>: Freeze, *const ArcInner<dyn KpiStore> is !null: Freeze, PhantomData<ArcInner<dyn KpiStore>>: Freeze, *const ArcInner<dyn AutonomyStore> is !null: Freeze, PhantomData<ArcInner<dyn AutonomyStore>>: Freeze, *const ArcInner<dyn SignalStore> is !null: Freeze, PhantomData<ArcInner<dyn SignalStore>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const LeafNode<&'static str, SetValZST> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(&'static str, SetValZST)>>: Freeze,

§

impl Move for KernelStores

§

impl Send for KernelStores
where Arc<dyn DurableRunStore>: Send, Arc<dyn ProcessStore>: Send, Arc<dyn ScheduleStore>: Send, Arc<dyn ApprovalStore>: Send, Arc<dyn ActionLedger>: Send, Arc<dyn SpendLedger>: Send, Arc<dyn GovernanceStateStore>: Send, Arc<dyn AgendaStore>: Send, Arc<dyn PartitionStore>: Send, Arc<dyn CronWatermarkStore>: Send, Arc<dyn AgentStore>: Send, Arc<dyn DeviceStore>: Send, Arc<dyn ControlStore>: Send, Arc<dyn DriverStore>: Send, Arc<dyn LedgerStore>: Send, Arc<dyn ChannelBindingStore>: Send, Arc<dyn CharterStore>: Send, Arc<dyn KpiStore>: Send, Arc<dyn AutonomyStore>: Send, Arc<dyn SignalStore>: Send, RawVecInner: Send, NodeRef<Owned, &'static str, SetValZST, LeafOrInternal>: Send, BoxRaw<(&'static str, SetValZST)>: Send,

§

impl Sync for KernelStores
where Arc<dyn DurableRunStore>: Sync, Arc<dyn ProcessStore>: Sync, Arc<dyn ScheduleStore>: Sync, Arc<dyn ApprovalStore>: Sync, Arc<dyn ActionLedger>: Sync, Arc<dyn SpendLedger>: Sync, Arc<dyn GovernanceStateStore>: Sync, Arc<dyn AgendaStore>: Sync, Arc<dyn PartitionStore>: Sync, Arc<dyn CronWatermarkStore>: Sync, Arc<dyn AgentStore>: Sync, Arc<dyn DeviceStore>: Sync, Arc<dyn ControlStore>: Sync, Arc<dyn DriverStore>: Sync, Arc<dyn LedgerStore>: Sync, Arc<dyn ChannelBindingStore>: Sync, Arc<dyn CharterStore>: Sync, Arc<dyn KpiStore>: Sync, Arc<dyn AutonomyStore>: Sync, Arc<dyn SignalStore>: Sync, RawVecInner: Sync, NodeRef<Owned, &'static str, SetValZST, LeafOrInternal>: Sync, BoxRaw<(&'static str, SetValZST)>: Sync,

§

impl Unpin for KernelStores

§

impl UnsafeUnpin for KernelStores
where *const ArcInner<dyn DurableRunStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn DurableRunStore>>: UnsafeUnpin, *const ArcInner<dyn ProcessStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ProcessStore>>: UnsafeUnpin, *const ArcInner<dyn ScheduleStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ScheduleStore>>: UnsafeUnpin, *const ArcInner<dyn ApprovalStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ApprovalStore>>: UnsafeUnpin, *const ArcInner<dyn ActionLedger> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ActionLedger>>: UnsafeUnpin, *const ArcInner<dyn SpendLedger> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn SpendLedger>>: UnsafeUnpin, *const ArcInner<dyn GovernanceStateStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn GovernanceStateStore>>: UnsafeUnpin, *const ArcInner<dyn AgendaStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AgendaStore>>: UnsafeUnpin, *const ArcInner<dyn PartitionStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn PartitionStore>>: UnsafeUnpin, *const ArcInner<dyn CronWatermarkStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn CronWatermarkStore>>: UnsafeUnpin, *const ArcInner<dyn AgentStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AgentStore>>: UnsafeUnpin, *const ArcInner<dyn DeviceStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn DeviceStore>>: UnsafeUnpin, *const ArcInner<dyn ControlStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ControlStore>>: UnsafeUnpin, *const ArcInner<dyn DriverStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn DriverStore>>: UnsafeUnpin, *const ArcInner<dyn LedgerStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn LedgerStore>>: UnsafeUnpin, *const ArcInner<dyn ChannelBindingStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ChannelBindingStore>>: UnsafeUnpin, *const ArcInner<dyn CharterStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn CharterStore>>: UnsafeUnpin, *const ArcInner<dyn KpiStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn KpiStore>>: UnsafeUnpin, *const ArcInner<dyn AutonomyStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AutonomyStore>>: UnsafeUnpin, *const ArcInner<dyn SignalStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn SignalStore>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const LeafNode<&'static str, SetValZST> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(&'static str, SetValZST)>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more