Skip to main content

HirnDB

Struct HirnDB 

Source
pub struct HirnDB { /* private fields */ }
Expand description

The main database handle.

Implementations§

Source§

impl HirnDB

Source

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.

Source

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).

Source

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

Source

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.

Source

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}.

Source

pub async fn list_agents(&self) -> HirnResult<Vec<AgentRecord>>

List all registered agents.

Source

pub async fn get_agent(&self, agent_id: &AgentId) -> HirnResult<AgentRecord>

Get a registered agent.

Source

pub async fn update_agent(&self, agent: &AgentRecord) -> HirnResult<()>

Update a registered agent record.

Source

pub async fn deregister_agent(&self, agent_id: &AgentId) -> HirnResult<()>

Deregister an agent and delete its private namespace.

Source

pub async fn create_team_namespace( &self, name: &str, agent_ids: Vec<AgentId>, ) -> HirnResult<()>

Create a team namespace with the given agent members.

Source

pub async fn add_agent_to_team( &self, agent_id: &AgentId, team_name: &str, ) -> HirnResult<()>

Add an agent to a team namespace.

Source

pub async fn remove_agent_from_team( &self, agent_id: &AgentId, team_name: &str, ) -> HirnResult<()>

Remove an agent from a team namespace.

Source

pub async fn ensure_agent(&self, agent_id: &AgentId) -> HirnResult<()>

Register an agent if not already registered. Returns Ok(()) in either case.

Source

pub async fn as_agent(&self, agent_id: &AgentId) -> HirnResult<AgentContext<'_>>

Create an agent-scoped context for namespace-isolated operations.

Source§

impl HirnDB

Source

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.

Source

pub fn embedding_dims(&self) -> usize

Get the configured embedding dimensions.

Source§

impl HirnDB

Source

pub fn episodic(&self) -> EpisodicView<'_>

Access episodic memory operations.

Source

pub fn semantic(&self) -> SemanticView<'_>

Access semantic memory operations.

Source

pub fn procedural(&self) -> ProceduralView<'_>

Access procedural memory operations.

Source

pub fn working(&self) -> WorkingView<'_>

Access working memory operations.

Source

pub fn graph_view(&self) -> GraphView<'_>

Access graph operations.

Source

pub fn recall_view(&self) -> RecallView<'_>

Access recall, think and trace operations.

Source

pub fn namespaces(&self) -> NamespaceView<'_>

Access namespace management operations.

Source

pub fn policy(&self) -> PolicyView<'_>

Access Cedar policy operations.

Source

pub fn admin(&self) -> AdminView<'_>

Access administrative operations (stats, compaction, maintenance).

Source

pub fn ql(&self) -> QueryView<'_>

Access HirnQL query execution operations.

Source

pub fn causal(&self) -> CausalView<'_>

Access causal reasoning operations (contradictions, quarantine, ABA).

Source§

impl HirnDB

Source

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.

Source

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.

Source

pub const fn config(&self) -> &HirnConfig

Get the config.

Source

pub fn tier_policy(&self) -> TierPolicy

Get a snapshot of the current tier policy.

Source

pub fn set_tier_policy(&self, policy: TierPolicy)

Update the tier policy at runtime (used by SET TIER_POLICY).

Source

pub fn path(&self) -> &Path

Get the database file path.

Source

pub fn session(&self) -> &SessionContext

Get the DataFusion SessionContext with scoring UDFs and HirnSessionExt pre-registered.

Source

pub fn query_pipeline(&self) -> &QueryPipeline

Get the 7-stage query pipeline (stages 1–4 in hirn-query).

Source

pub fn plan_cache(&self) -> &Arc<PlanCache>

Get the shared plan cache.

Source

pub fn reconsolidation_tracker(&self) -> &ReconsolidationTracker

Get the reconsolidation tracker.

Source

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.

Source

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.

Source

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.

Source

pub fn set_tokenizer(&self, tokenizer: Arc<dyn Tokenizer>)

Set the tokenizer used for token-aware budgeting paths.

Source

pub fn tokenizer(&self) -> Arc<dyn Tokenizer>

Get the tokenizer used by this database instance.

Source

pub fn pending_embed_count(&self) -> usize

Number of memory IDs awaiting background embed retry.

Source

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.

Source

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.

Source

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.

Source

pub fn fts_initialized(&self) -> bool

Check whether FTS indexes have been created.

Source

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.

Source

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.

Source

pub fn prefetch_stats(&self) -> PrefetchStats

Get a snapshot of prefetch statistics.

Source

pub fn index_advisor(&self) -> &IndexAdvisor

Get a reference to the index advisor for query pattern analysis.

Source

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.

Source

pub fn event_log(&self) -> Option<Arc<EventLog>>

Get a reference to the event log, if event sourcing is enabled.

Source

pub fn persistent_graph(&self) -> &PersistentGraph

Get a reference to the persistent graph (cold tier).

Source

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.

Source

pub fn cached_graph(&self) -> &CachedGraphStore

Get a reference to the two-tier cached graph store.

Source

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.

Source

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.

Source

pub fn admission_pipeline(&self) -> Option<&AdmissionPipeline>

Get a reference to the admission pipeline, if configured.

Source

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).

Source

pub fn policy_engine(&self) -> Option<&PolicyEngine>

Get a reference to the policy engine, if configured.

Source

pub fn storage_backend(&self) -> &dyn PhysicalStore

Get the storage backend.

Source

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).

Source

pub async fn apply_resource_retention_policy( &self, policy: &ResourceRetentionPolicy, ) -> HirnResult<ResourceRetentionApplyResult>

Apply a specific resource retention policy to active resource heads.

Source

pub async fn apply_configured_resource_retention( &self, ) -> HirnResult<ResourceRetentionApplyResult>

Apply the configured resource retention policy from HirnConfig.

Source

pub fn embedder(&self) -> Option<Arc<dyn Embedder>>

Get the configured embedder, if any.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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§

Source§

impl Drop for HirnDB

F-S1: Flush remaining Hebbian buffer on drop to ensure weight updates are persisted even if the caller doesn’t explicitly flush.

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

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> 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<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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> 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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
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: 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: 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> 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> Fruit for T
where T: Send + Downcast,

Source§

impl<T> MaybeSend for T
where T: Send,