pub struct HirnDB { /* private fields */ }Expand description
The main database handle.
Implementations§
Source§impl HirnDB
impl HirnDB
Sourcepub async fn remember_bypass_admission(
&self,
record: EpisodicRecord,
) -> HirnResult<MemoryId>
pub async fn remember_bypass_admission( &self, record: EpisodicRecord, ) -> HirnResult<MemoryId>
Store an episodic record bypassing admission control.
Useful for data migration, admin writes, or replaying events.
Sourcepub async fn record_episode_access(&self, id: MemoryId) -> HirnResult<()>
pub async fn record_episode_access(&self, id: MemoryId) -> HirnResult<()>
Update access stats for a single episodic record. Called periodically or on important reads (e.g., from recall).
Sourcepub fn start_decay_task(self: &Arc<Self>, interval: Duration) -> JoinHandle<()>
pub fn start_decay_task(self: &Arc<Self>, interval: Duration) -> JoinHandle<()>
Start a background task that periodically runs decay + TTL purge.
Returns a JoinHandle that can be awaited on shutdown.
The task runs at interval cadence and stops when the returned
handle is aborted or the runtime shuts down.
Source§impl HirnDB
impl HirnDB
Sourcepub fn subscribe(&self) -> Receiver<MemoryEvent>
pub fn subscribe(&self) -> Receiver<MemoryEvent>
Subscribe to real-time memory events.
Returns a tokio::sync::broadcast::Receiver<MemoryEvent> that yields
events whenever the database state changes (create, archive,
consolidate, etc.). The broadcast ring buffer is lock-free; lagging
subscribers receive a
tokio::sync::broadcast::error::RecvError::Lagged error and skip
missed events rather than blocking the write path.
Sourcepub async fn register_agent(
&self,
agent_id: &AgentId,
display_name: impl Into<String>,
) -> HirnResult<()>
pub async fn register_agent( &self, agent_id: &AgentId, display_name: impl Into<String>, ) -> HirnResult<()>
Register a new agent. Creates private namespace private:{agent_id}.
Sourcepub async fn list_agents(&self) -> HirnResult<Vec<AgentRecord>>
pub async fn list_agents(&self) -> HirnResult<Vec<AgentRecord>>
List all registered agents.
Sourcepub async fn get_agent(&self, agent_id: &AgentId) -> HirnResult<AgentRecord>
pub async fn get_agent(&self, agent_id: &AgentId) -> HirnResult<AgentRecord>
Get a registered agent.
Sourcepub async fn update_agent(&self, agent: &AgentRecord) -> HirnResult<()>
pub async fn update_agent(&self, agent: &AgentRecord) -> HirnResult<()>
Update a registered agent record.
Sourcepub async fn deregister_agent(&self, agent_id: &AgentId) -> HirnResult<()>
pub async fn deregister_agent(&self, agent_id: &AgentId) -> HirnResult<()>
Deregister an agent and delete its private namespace.
Sourcepub async fn create_team_namespace(
&self,
name: &str,
agent_ids: Vec<AgentId>,
) -> HirnResult<()>
pub async fn create_team_namespace( &self, name: &str, agent_ids: Vec<AgentId>, ) -> HirnResult<()>
Create a team namespace with the given agent members.
Sourcepub async fn add_agent_to_team(
&self,
agent_id: &AgentId,
team_name: &str,
) -> HirnResult<()>
pub async fn add_agent_to_team( &self, agent_id: &AgentId, team_name: &str, ) -> HirnResult<()>
Add an agent to a team namespace.
Sourcepub async fn remove_agent_from_team(
&self,
agent_id: &AgentId,
team_name: &str,
) -> HirnResult<()>
pub async fn remove_agent_from_team( &self, agent_id: &AgentId, team_name: &str, ) -> HirnResult<()>
Remove an agent from a team namespace.
Sourcepub async fn ensure_agent(&self, agent_id: &AgentId) -> HirnResult<()>
pub async fn ensure_agent(&self, agent_id: &AgentId) -> HirnResult<()>
Register an agent if not already registered. Returns Ok(()) in either case.
Sourcepub async fn as_agent(&self, agent_id: &AgentId) -> HirnResult<AgentContext<'_>>
pub async fn as_agent(&self, agent_id: &AgentId) -> HirnResult<AgentContext<'_>>
Create an agent-scoped context for namespace-isolated operations.
Source§impl HirnDB
impl HirnDB
Sourcepub async fn batch_recall<'a>(
&'a self,
builders: Vec<RecallBuilder<'a>>,
) -> Vec<HirnResult<Vec<RecallResult>>> ⓘ
pub async fn batch_recall<'a>( &'a self, builders: Vec<RecallBuilder<'a>>, ) -> Vec<HirnResult<Vec<RecallResult>>> ⓘ
Execute multiple recall queries concurrently. Returns per-query results.
Sourcepub fn embedding_dims(&self) -> usize
pub fn embedding_dims(&self) -> usize
Get the configured embedding dimensions.
Source§impl HirnDB
impl HirnDB
Sourcepub fn episodic(&self) -> EpisodicView<'_>
pub fn episodic(&self) -> EpisodicView<'_>
Access episodic memory operations.
Sourcepub fn semantic(&self) -> SemanticView<'_>
pub fn semantic(&self) -> SemanticView<'_>
Access semantic memory operations.
Sourcepub fn procedural(&self) -> ProceduralView<'_>
pub fn procedural(&self) -> ProceduralView<'_>
Access procedural memory operations.
Sourcepub fn working(&self) -> WorkingView<'_>
pub fn working(&self) -> WorkingView<'_>
Access working memory operations.
Sourcepub fn graph_view(&self) -> GraphView<'_>
pub fn graph_view(&self) -> GraphView<'_>
Access graph operations.
Sourcepub fn recall_view(&self) -> RecallView<'_>
pub fn recall_view(&self) -> RecallView<'_>
Access recall, think and trace operations.
Sourcepub fn namespaces(&self) -> NamespaceView<'_>
pub fn namespaces(&self) -> NamespaceView<'_>
Access namespace management operations.
Sourcepub fn policy(&self) -> PolicyView<'_>
pub fn policy(&self) -> PolicyView<'_>
Access Cedar policy operations.
Sourcepub fn admin(&self) -> AdminView<'_>
pub fn admin(&self) -> AdminView<'_>
Access administrative operations (stats, compaction, maintenance).
Sourcepub fn causal(&self) -> CausalView<'_>
pub fn causal(&self) -> CausalView<'_>
Access causal reasoning operations (contradictions, quarantine, ABA).
Source§impl HirnDB
impl HirnDB
Sourcepub async fn open(
path: impl AsRef<Path>,
storage: Arc<dyn PhysicalStore>,
) -> HirnResult<Self>
pub async fn open( path: impl AsRef<Path>, storage: Arc<dyn PhysicalStore>, ) -> HirnResult<Self>
Open or create a database at the given path with the given storage backend.
Sourcepub async fn open_with_config(
config: HirnConfig,
storage: Arc<dyn PhysicalStore>,
) -> HirnResult<Self>
pub async fn open_with_config( config: HirnConfig, storage: Arc<dyn PhysicalStore>, ) -> HirnResult<Self>
Open or create a database with the given configuration and storage backend.
All data is stored exclusively in LanceDB via the PhysicalStore.
On startup, the in-memory namespace index is rebuilt from stored records.
Sourcepub const fn config(&self) -> &HirnConfig
pub const fn config(&self) -> &HirnConfig
Get the config.
Sourcepub fn tier_policy(&self) -> TierPolicy
pub fn tier_policy(&self) -> TierPolicy
Get a snapshot of the current tier policy.
Sourcepub fn set_tier_policy(&self, policy: TierPolicy)
pub fn set_tier_policy(&self, policy: TierPolicy)
Update the tier policy at runtime (used by SET TIER_POLICY).
Sourcepub fn session(&self) -> &SessionContext
pub fn session(&self) -> &SessionContext
Get the DataFusion SessionContext with scoring UDFs and
HirnSessionExt pre-registered.
Sourcepub fn query_pipeline(&self) -> &QueryPipeline
pub fn query_pipeline(&self) -> &QueryPipeline
Get the 7-stage query pipeline (stages 1–4 in hirn-query).
Sourcepub fn plan_cache(&self) -> &Arc<PlanCache> ⓘ
pub fn plan_cache(&self) -> &Arc<PlanCache> ⓘ
Get the shared plan cache.
Sourcepub fn reconsolidation_tracker(&self) -> &ReconsolidationTracker
pub fn reconsolidation_tracker(&self) -> &ReconsolidationTracker
Get the reconsolidation tracker.
Sourcepub fn set_embedder(&self, embedder: Arc<dyn Embedder>)
pub fn set_embedder(&self, embedder: Arc<dyn Embedder>)
Set a custom embedding provider (F-39).
When set, RECALL, REMEMBER, and UPSERT SEMANTIC will use this
embedder instead of the built-in pseudo-embedding hash. The provider is
wrapped in the default multimodal router so multi_content and
composite auto-embedding use the same configured runtime wrappers.
Also updates the HirnSessionExt in the DataFusion SessionContext
so that operators (e.g. RpeScoreExec, ProspectiveIndexingExec)
can access the embedder at execution time.
Sourcepub fn set_multimodal_embedder(&self, embedder: Arc<MultiModalEmbedder>)
pub fn set_multimodal_embedder(&self, embedder: Arc<MultiModalEmbedder>)
Set a modality-aware embedding provider chain.
Each configured underlying embedder is wrapped through the standard retry/cache/circuit-breaker/batching pipeline before being installed.
Sourcepub fn set_multivec_embedder(&self, embedder: Arc<dyn Embedder>)
pub fn set_multivec_embedder(&self, embedder: Arc<dyn Embedder>)
Set a multivector (ColBERT-style) embedder for late interaction search.
When set and config.multivector_enabled is true, recall queries will
additionally compute MaxSim scores from token-level embeddings.
Sourcepub fn set_tokenizer(&self, tokenizer: Arc<dyn Tokenizer>)
pub fn set_tokenizer(&self, tokenizer: Arc<dyn Tokenizer>)
Set the tokenizer used for token-aware budgeting paths.
Sourcepub fn tokenizer(&self) -> Arc<dyn Tokenizer> ⓘ
pub fn tokenizer(&self) -> Arc<dyn Tokenizer> ⓘ
Get the tokenizer used by this database instance.
Sourcepub fn pending_embed_count(&self) -> usize
pub fn pending_embed_count(&self) -> usize
Number of memory IDs awaiting background embed retry.
Sourcepub async fn retry_pending_embeds(&self) -> (usize, usize)
pub async fn retry_pending_embeds(&self) -> (usize, usize)
Retry embedding for records that were stored without embeddings due to provider failure. Call this after the embed provider recovers.
Returns (succeeded, failed) counts. Failed items are requeued up to
max_attempts (default 3) with exponential backoff.
Sourcepub fn set_reranker(&self, reranker: Arc<dyn Reranker>)
pub fn set_reranker(&self, reranker: Arc<dyn Reranker>)
Set a reranker for post-retrieval relevance reordering.
When set and query_text is provided, recall results are reranked after
composite scoring. Use with CohereReranker, LlmReranker, or any
custom Reranker implementation.
Sourcepub async fn ensure_fts_indexes(&self) -> HirnResult<()>
pub async fn ensure_fts_indexes(&self) -> HirnResult<()>
Ensure FTS indexes exist on all LanceDB datasets.
Creates full-text search indexes on the text columns of each dataset
(episodic → content, semantic → description, procedural → description).
Idempotent: only runs once per HirnDB instance. Subsequent calls are no-ops.
Sourcepub fn fts_initialized(&self) -> bool
pub fn fts_initialized(&self) -> bool
Check whether FTS indexes have been created.
Sourcepub async fn create_vector_indexes(
&self,
index_type: IndexType,
params: Option<IndexParams>,
) -> HirnResult<()>
pub async fn create_vector_indexes( &self, index_type: IndexType, params: Option<IndexParams>, ) -> HirnResult<()>
Create vector indexes on all embedding columns (episodic, semantic, procedural).
Skips datasets that don’t exist or have no rows. Uses replace: false
so existing indexes are kept.
Sourcepub async fn rebuild_vector_indexes(
&self,
index_type: IndexType,
params: Option<IndexParams>,
) -> HirnResult<()>
pub async fn rebuild_vector_indexes( &self, index_type: IndexType, params: Option<IndexParams>, ) -> HirnResult<()>
Rebuild vector indexes on all embedding columns (episodic, semantic, procedural).
Same as create_vector_indexes but with
replace: true, so any existing vector index is dropped and recreated.
Sourcepub fn prefetch_stats(&self) -> PrefetchStats
pub fn prefetch_stats(&self) -> PrefetchStats
Get a snapshot of prefetch statistics.
Sourcepub fn index_advisor(&self) -> &IndexAdvisor
pub fn index_advisor(&self) -> &IndexAdvisor
Get a reference to the index advisor for query pattern analysis.
Sourcepub fn set_event_log(&self, log: Arc<EventLog>)
pub fn set_event_log(&self, log: Arc<EventLog>)
Enable event sourcing by attaching an EventLog.
Once set, every mutation (remember, archive, store_semantic, etc.)
will be appended to the durable event log in addition to the in-memory
broadcast channel.
Sourcepub fn event_log(&self) -> Option<Arc<EventLog>>
pub fn event_log(&self) -> Option<Arc<EventLog>>
Get a reference to the event log, if event sourcing is enabled.
Sourcepub fn persistent_graph(&self) -> &PersistentGraph
pub fn persistent_graph(&self) -> &PersistentGraph
Get a reference to the persistent graph (cold tier).
Sourcepub fn graph_store(&self) -> &dyn GraphStore
pub fn graph_store(&self) -> &dyn GraphStore
Get a unified graph store reference.
Returns the CachedGraphStore as &dyn GraphStore — reads use the
hot tier (sub-ms), writes are write-through to both tiers.
Sourcepub fn cached_graph(&self) -> &CachedGraphStore
pub fn cached_graph(&self) -> &CachedGraphStore
Get a reference to the two-tier cached graph store.
Sourcepub fn set_admission_pipeline(&mut self, pipeline: AdmissionPipeline)
pub fn set_admission_pipeline(&mut self, pipeline: AdmissionPipeline)
Set the admission control pipeline.
When configured, remember() runs candidates through the pipeline
before materializing them. Rejected candidates return an error.
Sourcepub fn setup_default_admission_pipeline(&mut self)
pub fn setup_default_admission_pipeline(&mut self)
Build and set the default admission pipeline from config.
Default order: [SurpriseGate, DuplicateDetector, TokenBudgetGate, RateLimiter].
Only sets the pipeline if config.admission_enabled is true.
Sourcepub fn admission_pipeline(&self) -> Option<&AdmissionPipeline>
pub fn admission_pipeline(&self) -> Option<&AdmissionPipeline>
Get a reference to the admission pipeline, if configured.
Sourcepub fn set_policy_engine(&mut self, engine: PolicyEngine)
pub fn set_policy_engine(&mut self, engine: PolicyEngine)
Set the Cedar policy engine for fine-grained authorization.
When set, enforce() evaluates every operation against loaded Cedar
policies. When unset, all operations are allowed (embedded mode).
Sourcepub fn policy_engine(&self) -> Option<&PolicyEngine>
pub fn policy_engine(&self) -> Option<&PolicyEngine>
Get a reference to the policy engine, if configured.
Sourcepub fn storage_backend(&self) -> &dyn PhysicalStore
pub fn storage_backend(&self) -> &dyn PhysicalStore
Get the storage backend.
Sourcepub fn storage_arc(&self) -> Arc<dyn PhysicalStore> ⓘ
pub fn storage_arc(&self) -> Arc<dyn PhysicalStore> ⓘ
Get a cloned Arc to the underlying storage backend.
Use this when a long-lived (possibly 'static) reference to the
storage is needed (e.g. fire-and-forget background tasks).
Sourcepub async fn apply_resource_retention_policy(
&self,
policy: &ResourceRetentionPolicy,
) -> HirnResult<ResourceRetentionApplyResult>
pub async fn apply_resource_retention_policy( &self, policy: &ResourceRetentionPolicy, ) -> HirnResult<ResourceRetentionApplyResult>
Apply a specific resource retention policy to active resource heads.
Sourcepub async fn apply_configured_resource_retention(
&self,
) -> HirnResult<ResourceRetentionApplyResult>
pub async fn apply_configured_resource_retention( &self, ) -> HirnResult<ResourceRetentionApplyResult>
Apply the configured resource retention policy from HirnConfig.
Sourcepub async fn embed_text(&self, text: &str) -> HirnResult<Vec<f32>>
pub async fn embed_text(&self, text: &str) -> HirnResult<Vec<f32>>
Embed a single text using the configured embedder, falling back to pseudo-embedding when no real model is available.
Sourcepub async fn embed_content(
&self,
content: &MemoryContent,
) -> HirnResult<Vec<f32>>
pub async fn embed_content( &self, content: &MemoryContent, ) -> HirnResult<Vec<f32>>
Embed a MemoryContent value using the text representation for each
modality. Images use their description, code uses source, audio uses
transcript, structured uses JSON serialization.
Sourcepub async fn fetch_resource(
&self,
actor_id: &AgentId,
resource_id: ResourceId,
hydration_mode: HydrationMode,
) -> HirnResult<Option<HydratedResource>>
pub async fn fetch_resource( &self, actor_id: &AgentId, resource_id: ResourceId, hydration_mode: HydrationMode, ) -> HirnResult<Option<HydratedResource>>
Fetch a resource with actor-scoped metadata/preview/full hydration semantics.
MetadataOnly and Preview require Recall; Full additionally requires
RecallRawText for the resource namespace.
Sourcepub async fn load_resource_blob(
&self,
actor_id: &AgentId,
id: MemoryId,
blob_index: u32,
) -> HirnResult<Vec<u8>>
pub async fn load_resource_blob( &self, actor_id: &AgentId, id: MemoryId, blob_index: u32, ) -> HirnResult<Vec<u8>>
Load resource-backed blob data for an episodic memory record slot.
Sourcepub async fn hydrate_content_resources(
&self,
actor_id: &AgentId,
namespace: Namespace,
content: &MemoryContent,
evidence_links: &[EvidenceLink],
) -> HirnResult<MemoryContent>
pub async fn hydrate_content_resources( &self, actor_id: &AgentId, namespace: Namespace, content: &MemoryContent, evidence_links: &[EvidenceLink], ) -> HirnResult<MemoryContent>
Hydrate a MemoryContent by restoring binary payloads referenced through evidence links.
Raw hydration is explicit and requires RecallRawText permission for the namespace.
Sourcepub async fn get_episode_with_resources(
&self,
actor_id: &AgentId,
id: MemoryId,
) -> HirnResult<EpisodicRecord>
pub async fn get_episode_with_resources( &self, actor_id: &AgentId, id: MemoryId, ) -> HirnResult<EpisodicRecord>
Retrieve an episodic record with all resource-backed payloads hydrated.
Full hydration is explicit and requires RecallRawText permission.
Sourcepub async fn close(&self) -> HirnResult<()>
pub async fn close(&self) -> HirnResult<()>
Explicitly flush all pending buffers (Hebbian, episodic access, semantic access) and prepare the database for shutdown.
This drains the Hebbian weight buffer, flushes access-count deltas, completes
pending offline scheduler jobs, and returns cleanly. Prefer calling this before
dropping the last Arc<HirnDB> reference; if omitted, Drop runs a best-effort
synchronous flush on a helper thread (F-125 fix).
Source§impl HirnDB
impl HirnDB
Sourcepub fn watch(&self, filter: WatchFilter) -> HirnResult<WatchSubscription>
pub fn watch(&self, filter: WatchFilter) -> HirnResult<WatchSubscription>
Create a watch subscription with the given filter.
Requires an active EventLog (returns error otherwise).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HirnDB
impl !RefUnwindSafe for HirnDB
impl Send for HirnDB
impl Sync for HirnDB
impl Unpin for HirnDB
impl UnsafeUnpin for HirnDB
impl !UnwindSafe for HirnDB
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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> 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,
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.