Skip to main content

DakeraClient

Struct DakeraClient 

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

Dakeraclient for interacting with the vector database

Implementations§

Source§

impl DakeraClient

Source

pub async fn cluster_status(&self) -> Result<ClusterStatus>

Get cluster status overview

Source

pub async fn cluster_nodes(&self) -> Result<NodeListResponse>

List cluster nodes

Source

pub async fn list_namespaces_admin(&self) -> Result<NamespaceListResponse>

List all namespaces with detailed admin statistics

Source

pub async fn delete_namespace_admin(&self, namespace: &str) -> Result<Value>

Delete an entire namespace and all its data

Source

pub async fn optimize_namespace( &self, namespace: &str, request: OptimizeRequest, ) -> Result<OptimizeResponse>

Optimize a namespace

Source

pub async fn index_stats(&self) -> Result<IndexStatsResponse>

Get index statistics for all namespaces

Source

pub async fn rebuild_indexes( &self, request: RebuildIndexRequest, ) -> Result<RebuildIndexResponse>

Rebuild indexes

Source

pub async fn cache_stats(&self) -> Result<CacheStats>

Get cache statistics

Source

pub async fn cache_clear( &self, namespace: Option<&str>, ) -> Result<ClearCacheResponse>

Clear cache, optionally for a specific namespace

Source

pub async fn get_config(&self) -> Result<RuntimeConfig>

Get runtime configuration

Source

pub async fn update_config( &self, updates: HashMap<String, Value>, ) -> Result<UpdateConfigResponse>

Update runtime configuration

Source

pub async fn get_quotas(&self) -> Result<QuotaListResponse>

List all namespace quotas

Source

pub async fn get_quota(&self, namespace: &str) -> Result<QuotaStatus>

Get quota for a specific namespace

Source

pub async fn set_quota( &self, namespace: &str, config: QuotaConfig, ) -> Result<Value>

Set quota for a specific namespace

Source

pub async fn delete_quota(&self, namespace: &str) -> Result<Value>

Delete quota for a specific namespace

Source

pub async fn update_quotas(&self, config: Option<QuotaConfig>) -> Result<Value>

Update quotas (alias for set_quota on default)

Source

pub async fn slow_queries( &self, limit: Option<usize>, namespace: Option<&str>, query_type: Option<&str>, ) -> Result<SlowQueryListResponse>

List recent slow queries

Source

pub async fn slow_query_summary(&self) -> Result<Value>

Get slow query summary and patterns

Source

pub async fn clear_slow_queries(&self) -> Result<Value>

Clear slow query log

Source

pub async fn create_backup( &self, request: CreateBackupRequest, ) -> Result<CreateBackupResponse>

Create a new backup

Source

pub async fn list_backups(&self) -> Result<BackupListResponse>

List all backups

Source

pub async fn get_backup(&self, backup_id: &str) -> Result<BackupInfo>

Get backup details by ID

Source

pub async fn restore_backup( &self, request: RestoreBackupRequest, ) -> Result<RestoreBackupResponse>

Restore from a backup

Source

pub async fn delete_backup(&self, backup_id: &str) -> Result<Value>

Delete a backup

Source

pub async fn ttl_cleanup( &self, namespace: Option<&str>, ) -> Result<TtlCleanupResponse>

Run TTL cleanup on expired vectors

Source

pub async fn ttl_stats(&self) -> Result<TtlStatsResponse>

Get TTL statistics

Source§

impl DakeraClient

Source

pub async fn list_agents(&self) -> Result<Vec<AgentSummary>>

List all agents

Source

pub async fn agent_memories( &self, agent_id: &str, memory_type: Option<&str>, limit: Option<u32>, ) -> Result<Vec<RecalledMemory>>

Get memories for an agent

Source

pub async fn agent_stats(&self, agent_id: &str) -> Result<AgentStats>

Get stats for an agent

Source

pub async fn agent_sessions( &self, agent_id: &str, active_only: Option<bool>, limit: Option<u32>, ) -> Result<Vec<Session>>

Get sessions for an agent

Source§

impl DakeraClient

Source

pub async fn analytics_overview( &self, period: Option<&str>, namespace: Option<&str>, ) -> Result<AnalyticsOverview>

Get analytics overview

Source

pub async fn analytics_latency( &self, period: Option<&str>, namespace: Option<&str>, ) -> Result<LatencyAnalytics>

Get latency analytics

Source

pub async fn analytics_throughput( &self, period: Option<&str>, namespace: Option<&str>, ) -> Result<ThroughputAnalytics>

Get throughput analytics

Source

pub async fn analytics_storage( &self, namespace: Option<&str>, ) -> Result<StorageAnalytics>

Get storage analytics

Source§

impl DakeraClient

Source

pub fn new(base_url: impl Into<String>) -> Result<Self>

Create a new client with the given base URL

§Example
use dakera_client::DakeraClient;

let client = DakeraClient::new("http://localhost:3000").unwrap();
Source

pub fn builder(base_url: impl Into<String>) -> DakeraClientBuilder

Create a new client builder for more configuration options

Source

pub async fn health(&self) -> Result<HealthResponse>

Check server health

Source

pub async fn ready(&self) -> Result<ReadinessResponse>

Check if server is ready

Source

pub async fn live(&self) -> Result<bool>

Check if server is live

Source

pub async fn list_namespaces(&self) -> Result<Vec<String>>

List all namespaces

Source

pub async fn get_namespace(&self, namespace: &str) -> Result<NamespaceInfo>

Get namespace information

Source

pub async fn create_namespace( &self, namespace: &str, request: CreateNamespaceRequest, ) -> Result<NamespaceInfo>

Create a new namespace

Source

pub async fn upsert( &self, namespace: &str, request: UpsertRequest, ) -> Result<UpsertResponse>

Upsert vectors into a namespace

Source

pub async fn upsert_one( &self, namespace: &str, vector: Vector, ) -> Result<UpsertResponse>

Upsert a single vector (convenience method)

Source

pub async fn upsert_columns( &self, namespace: &str, request: ColumnUpsertRequest, ) -> Result<UpsertResponse>

Upsert vectors in column format (Turbopuffer-inspired)

This format is more efficient for bulk upserts as it avoids repeating field names for each vector. All arrays must have equal length.

§Example
use dakera_client::{DakeraClient, ColumnUpsertRequest};

let client = DakeraClient::new("http://localhost:3000")?;

let request = ColumnUpsertRequest::new(
    vec!["id1".to_string(), "id2".to_string(), "id3".to_string()],
    vec![
        vec![0.1, 0.2, 0.3],
        vec![0.4, 0.5, 0.6],
        vec![0.7, 0.8, 0.9],
    ],
)
.with_attribute("category", vec![
    serde_json::json!("A"),
    serde_json::json!("B"),
    serde_json::json!("A"),
]);

let response = client.upsert_columns("my-namespace", request).await?;
println!("Upserted {} vectors", response.upserted_count);
Source

pub async fn query( &self, namespace: &str, request: QueryRequest, ) -> Result<QueryResponse>

Query for similar vectors

Source

pub async fn query_simple( &self, namespace: &str, vector: Vec<f32>, top_k: u32, ) -> Result<QueryResponse>

Simple query with just a vector and top_k (convenience method)

Source

pub async fn batch_query( &self, namespace: &str, request: BatchQueryRequest, ) -> Result<BatchQueryResponse>

Execute multiple queries in a single request

This allows executing multiple vector similarity queries in parallel, which is more efficient than making separate requests.

§Example
use dakera_client::{DakeraClient, BatchQueryRequest, BatchQueryItem};

let client = DakeraClient::new("http://localhost:3000")?;

let request = BatchQueryRequest::new(vec![
    BatchQueryItem::new(vec![0.1, 0.2, 0.3], 5).with_id("query1"),
    BatchQueryItem::new(vec![0.4, 0.5, 0.6], 10).with_id("query2"),
]);

let response = client.batch_query("my-namespace", request).await?;
println!("Executed {} queries in {}ms", response.query_count, response.total_latency_ms);
Source

pub async fn delete( &self, namespace: &str, request: DeleteRequest, ) -> Result<DeleteResponse>

Delete vectors by ID

Source

pub async fn delete_one( &self, namespace: &str, id: &str, ) -> Result<DeleteResponse>

Delete a single vector by ID (convenience method)

Source

pub async fn index_documents( &self, namespace: &str, request: IndexDocumentsRequest, ) -> Result<IndexDocumentsResponse>

Index documents for full-text search

Source

pub async fn index_document( &self, namespace: &str, document: Document, ) -> Result<IndexDocumentsResponse>

Index a single document (convenience method)

Perform full-text search

Source

pub async fn search_text( &self, namespace: &str, query: &str, top_k: u32, ) -> Result<FullTextSearchResponse>

Simple full-text search (convenience method)

Source

pub async fn fulltext_stats(&self, namespace: &str) -> Result<FullTextStats>

Get full-text index statistics

Source

pub async fn fulltext_delete( &self, namespace: &str, request: DeleteRequest, ) -> Result<DeleteResponse>

Delete documents from full-text index

Perform hybrid search (vector + full-text)

Multi-vector search with positive/negative vectors and MMR

This performs semantic search using multiple positive vectors (to search towards) and optional negative vectors (to search away from). Supports MMR (Maximal Marginal Relevance) for result diversity.

§Example
use dakera_client::{DakeraClient, MultiVectorSearchRequest};

let client = DakeraClient::new("http://localhost:3000")?;

// Search towards multiple concepts, away from others
let request = MultiVectorSearchRequest::new(vec![
    vec![0.1, 0.2, 0.3],  // positive vector 1
    vec![0.4, 0.5, 0.6],  // positive vector 2
])
.with_negative_vectors(vec![
    vec![0.7, 0.8, 0.9],  // negative vector
])
.with_top_k(10)
.with_mmr(0.7);  // Enable MMR with lambda=0.7

let response = client.multi_vector_search("my-namespace", request).await?;
for result in response.results {
    println!("ID: {}, Score: {}", result.id, result.score);
}
Source

pub async fn aggregate( &self, namespace: &str, request: AggregationRequest, ) -> Result<AggregationResponse>

Aggregate vectors with grouping (Turbopuffer-inspired)

This performs aggregation queries on vector metadata, supporting count, sum, avg, min, and max operations with optional grouping.

§Example
use dakera_client::{DakeraClient, AggregationRequest};

let client = DakeraClient::new("http://localhost:3000")?;

// Count all vectors and sum scores, grouped by category
let request = AggregationRequest::new()
    .with_count("total_count")
    .with_sum("total_score", "score")
    .with_avg("avg_score", "score")
    .with_group_by("category");

let response = client.aggregate("my-namespace", request).await?;
if let Some(groups) = response.aggregation_groups {
    for group in groups {
        println!("Group: {:?}", group.group_key);
    }
}
Source

pub async fn unified_query( &self, namespace: &str, request: UnifiedQueryRequest, ) -> Result<UnifiedQueryResponse>

Unified query with flexible ranking options (Turbopuffer-inspired)

This provides a unified API for vector search (ANN/kNN), full-text search (BM25), and attribute ordering. Supports combining multiple ranking functions with Sum, Max, and Product operators.

§Example
use dakera_client::{DakeraClient, UnifiedQueryRequest, SortDirection};

let client = DakeraClient::new("http://localhost:3000")?;

// Vector ANN search
let request = UnifiedQueryRequest::vector_search(vec![0.1, 0.2, 0.3], 10);
let response = client.unified_query("my-namespace", request).await?;

// Full-text BM25 search
let request = UnifiedQueryRequest::fulltext_search("content", "hello world", 10);
let response = client.unified_query("my-namespace", request).await?;

// Attribute ordering with filter
let request = UnifiedQueryRequest::attribute_order("timestamp", SortDirection::Desc, 10)
    .with_filter(serde_json::json!({"category": {"$eq": "science"}}));
let response = client.unified_query("my-namespace", request).await?;

for result in response.results {
    println!("ID: {}, Score: {:?}", result.id, result.dist);
}

Simple vector search using the unified query API (convenience method)

This is a shortcut for unified_query with a vector ANN search.

Simple full-text search using the unified query API (convenience method)

This is a shortcut for unified_query with a BM25 full-text search.

Source

pub async fn explain_query( &self, namespace: &str, request: QueryExplainRequest, ) -> Result<QueryExplainResponse>

Explain query execution plan (similar to SQL EXPLAIN)

This provides detailed information about how a query will be executed, including index selection, execution stages, cost estimates, and performance recommendations.

§Example
use dakera_client::{DakeraClient, QueryExplainRequest};

let client = DakeraClient::new("http://localhost:3000")?;

// Explain a vector search query
let request = QueryExplainRequest::vector_search(vec![0.1, 0.2, 0.3], 10)
    .with_verbose();
let plan = client.explain_query("my-namespace", request).await?;

println!("Query plan: {}", plan.summary);
println!("Estimated time: {}ms", plan.cost_estimate.estimated_time_ms);

for stage in &plan.stages {
    println!("Stage {}: {} - {}", stage.order, stage.name, stage.description);
}

for rec in &plan.recommendations {
    println!("Recommendation ({}): {}", rec.priority, rec.description);
}
Source

pub async fn warm_cache( &self, request: WarmCacheRequest, ) -> Result<WarmCacheResponse>

Warm cache for vectors in a namespace

This pre-loads vectors into cache tiers for faster subsequent access. Supports priority levels and can run in the background.

§Example
use dakera_client::{DakeraClient, WarmCacheRequest, WarmingPriority};

let client = DakeraClient::new("http://localhost:3000")?;

// Warm entire namespace with high priority
let response = client.warm_cache(
    WarmCacheRequest::new("my-namespace")
        .with_priority(WarmingPriority::High)
).await?;

println!("Warmed {} entries", response.entries_warmed);
Source

pub async fn warm_vectors( &self, namespace: &str, vector_ids: Vec<String>, ) -> Result<WarmCacheResponse>

Warm specific vectors by ID (convenience method)

Source

pub async fn export( &self, namespace: &str, request: ExportRequest, ) -> Result<ExportResponse>

Export vectors from a namespace with pagination

This exports all vectors from a namespace, supporting pagination for large datasets. Use the next_cursor from the response to fetch subsequent pages.

§Example
use dakera_client::{DakeraClient, ExportRequest};

let client = DakeraClient::new("http://localhost:3000")?;

// Export first page of vectors
let mut request = ExportRequest::new().with_top_k(1000);
let response = client.export("my-namespace", request).await?;

println!("Exported {} vectors", response.returned_count);

// Fetch next page if available
if let Some(cursor) = response.next_cursor {
    let next_request = ExportRequest::new().with_cursor(cursor);
    let next_response = client.export("my-namespace", next_request).await?;
}
Source

pub async fn export_all(&self, namespace: &str) -> Result<ExportResponse>

Export all vectors from a namespace (convenience method)

This is a simple wrapper that exports with default settings.

Source

pub async fn diagnostics(&self) -> Result<SystemDiagnostics>

Get system diagnostics

Source

pub async fn list_jobs(&self) -> Result<Vec<JobInfo>>

List background jobs

Source

pub async fn get_job(&self, job_id: &str) -> Result<Option<JobInfo>>

Get a specific job status

Source

pub async fn compact( &self, request: CompactionRequest, ) -> Result<CompactionResponse>

Trigger index compaction

Source

pub async fn shutdown(&self) -> Result<()>

Request graceful shutdown

Source

pub async fn fetch( &self, namespace: &str, request: FetchRequest, ) -> Result<FetchResponse>

Fetch vectors by their IDs

Source

pub async fn fetch_by_ids( &self, namespace: &str, ids: &[&str], ) -> Result<Vec<Vector>>

Fetch vectors by IDs (convenience method)

Source

pub async fn upsert_text( &self, namespace: &str, request: UpsertTextRequest, ) -> Result<TextUpsertResponse>

Upsert text documents with automatic server-side embedding generation

Source

pub async fn query_text( &self, namespace: &str, request: QueryTextRequest, ) -> Result<TextQueryResponse>

Query using natural language text with automatic server-side embedding

Source

pub async fn query_text_simple( &self, namespace: &str, text: &str, top_k: u32, ) -> Result<TextQueryResponse>

Query text (convenience method)

Source

pub async fn batch_query_text( &self, namespace: &str, request: BatchQueryTextRequest, ) -> Result<BatchQueryTextResponse>

Execute multiple text queries with automatic embedding in a single request

Source§

impl DakeraClient

Source

pub async fn stream_namespace_events( &self, namespace: &str, ) -> Result<Receiver<Result<DakeraEvent>>>

Subscribe to namespace-scoped SSE events.

Opens a long-lived connection to GET /v1/namespaces/{namespace}/events and returns a tokio::sync::mpsc::Receiver that yields [DakeraEvent] results as they arrive. The background task exits when the server closes the stream or the receiver is dropped.

Requires a Read-scoped API key.

§Example
use dakera_client::DakeraClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;
    let mut rx = client.stream_namespace_events("my-ns").await?;
    while let Some(result) = rx.recv().await {
        println!("{:?}", result?);
    }
    Ok(())
}
Source

pub async fn stream_global_events( &self, ) -> Result<Receiver<Result<DakeraEvent>>>

Subscribe to the global SSE event stream (all namespaces).

Opens a long-lived connection to GET /ops/events and returns a tokio::sync::mpsc::Receiver that yields [DakeraEvent] results.

Requires an Admin-scoped API key.

Source

pub async fn stream_memory_events( &self, ) -> Result<Receiver<Result<MemoryEvent>>>

Subscribe to the memory lifecycle SSE event stream (DASH-B).

Opens a long-lived connection to GET /v1/events/stream and returns a tokio::sync::mpsc::Receiver that yields [MemoryEvent] results as they arrive. The background task exits when the server closes the stream or the receiver is dropped.

Requires a Read-scoped API key.

Source§

impl DakeraClient

Source

pub async fn create_key( &self, request: CreateKeyRequest, ) -> Result<CreateKeyResponse>

Create a new API key

Source

pub async fn list_keys(&self) -> Result<ListKeysResponse>

List all API keys

Source

pub async fn get_key(&self, key_id: &str) -> Result<KeyInfo>

Get a specific API key by ID

Source

pub async fn delete_key(&self, key_id: &str) -> Result<KeySuccessResponse>

Delete (revoke) an API key

Source

pub async fn deactivate_key(&self, key_id: &str) -> Result<KeySuccessResponse>

Deactivate an API key (soft delete)

Source

pub async fn rotate_key(&self, key_id: &str) -> Result<RotateKeyResponse>

Rotate an API key (creates new key, deactivates old)

Source

pub async fn key_usage(&self, key_id: &str) -> Result<ApiKeyUsageResponse>

Get API key usage statistics

Source§

impl DakeraClient

Source

pub async fn knowledge_graph( &self, request: KnowledgeGraphRequest, ) -> Result<KnowledgeGraphResponse>

Build a knowledge graph from a seed memory

Source

pub async fn full_knowledge_graph( &self, request: FullKnowledgeGraphRequest, ) -> Result<KnowledgeGraphResponse>

Build a full knowledge graph for an agent

Source

pub async fn summarize( &self, request: SummarizeRequest, ) -> Result<SummarizeResponse>

Summarize memories

Source

pub async fn deduplicate( &self, request: DeduplicateRequest, ) -> Result<DeduplicateResponse>

Deduplicate memories

Source

pub async fn cross_agent_network( &self, request: CrossAgentNetworkRequest, ) -> Result<CrossAgentNetworkResponse>

Build a cross-agent knowledge network (DASH-A).

Calls POST /v1/knowledge/network/cross-agent (Admin scope) and returns a graph of memory nodes and cross-agent similarity edges.

Source§

impl DakeraClient

Source

pub async fn store_memory( &self, request: StoreMemoryRequest, ) -> Result<StoreMemoryResponse>

Store a memory for an agent

§Example
use dakera_client::{DakeraClient, memory::StoreMemoryRequest};

let client = DakeraClient::new("http://localhost:3000")?;

let request = StoreMemoryRequest::new("agent-1", "The user prefers dark mode")
    .with_importance(0.8)
    .with_tags(vec!["preferences".to_string()]);

let response = client.store_memory(request).await?;
println!("Stored memory: {}", response.memory_id);
Source

pub async fn recall(&self, request: RecallRequest) -> Result<RecallResponse>

Recall memories by semantic query

§Example
use dakera_client::{DakeraClient, memory::RecallRequest};

let client = DakeraClient::new("http://localhost:3000")?;

let request = RecallRequest::new("agent-1", "user preferences")
    .with_top_k(10);

let response = client.recall(request).await?;
for memory in response.memories {
    println!("{}: {} (score: {})", memory.id, memory.content, memory.score);
}
Source

pub async fn recall_simple( &self, agent_id: &str, query: &str, top_k: usize, ) -> Result<RecallResponse>

Simple recall with just agent_id and query (convenience method)

Source

pub async fn get_memory(&self, memory_id: &str) -> Result<RecalledMemory>

Get a specific memory by ID

Source

pub async fn forget(&self, request: ForgetRequest) -> Result<ForgetResponse>

Forget (delete) memories

Source

pub async fn search_memories( &self, request: RecallRequest, ) -> Result<RecallResponse>

Search memories with advanced filters

Source

pub async fn update_memory( &self, agent_id: &str, memory_id: &str, request: UpdateMemoryRequest, ) -> Result<StoreMemoryResponse>

Update an existing memory

Source

pub async fn update_importance( &self, agent_id: &str, request: UpdateImportanceRequest, ) -> Result<Value>

Update importance of memories

Source

pub async fn consolidate( &self, agent_id: &str, request: ConsolidateRequest, ) -> Result<ConsolidateResponse>

Consolidate memories for an agent

Source

pub async fn memory_feedback( &self, agent_id: &str, request: FeedbackRequest, ) -> Result<FeedbackResponse>

Submit feedback on a memory recall

Source

pub async fn start_session(&self, agent_id: &str) -> Result<Session>

Start a new session for an agent

Source

pub async fn start_session_with_metadata( &self, agent_id: &str, metadata: Value, ) -> Result<Session>

Start a session with metadata

Source

pub async fn end_session( &self, session_id: &str, summary: Option<String>, ) -> Result<Session>

End a session, optionally with a summary

Source

pub async fn get_session(&self, session_id: &str) -> Result<Session>

Get a session by ID

Source

pub async fn list_sessions(&self, agent_id: &str) -> Result<Vec<Session>>

List sessions for an agent

Source

pub async fn session_memories(&self, session_id: &str) -> Result<RecallResponse>

Get memories in a session

Trait Implementations§

Source§

impl Clone for DakeraClient

Source§

fn clone(&self) -> DakeraClient

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for DakeraClient

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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