connect

Function connect 

Source
pub async fn connect(
    impl_name: &str,
    properties: HashMap<String, String>,
) -> Result<Arc<dyn LanceNamespace>, ConnectError>
Expand description

Connect to a Lance namespace implementation.

This function creates a connection to a Lance namespace backend based on the specified implementation type and configuration properties.

§Arguments

  • impl_name - Implementation identifier. Currently supported:

    • “rest”: REST API implementation (when available)
    • “dir”: Directory-based implementation (when available)
  • properties - Configuration properties specific to the implementation. Common properties might include:

    • “url”: Base URL for REST implementations
    • “path”: Directory path for file-based implementations
    • “auth_token”: Authentication token

§Returns

Returns a boxed trait object implementing the LanceNamespace trait.

§Examples

use lance_namespace::connect;
use std::collections::HashMap;

let mut props = HashMap::new();
props.insert("url".to_string(), "http://localhost:8080".to_string());
let namespace = connect("rest", props).await?;