qdrant-edge 0.7.1

A lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::path::Path;

use crate::segment::common::operation_error::{OperationError, OperationResult};

pub fn strip_prefix<'a>(path: &'a Path, prefix: &Path) -> OperationResult<&'a Path> {
    path.strip_prefix(prefix).map_err(|err| {
        OperationError::service_error(format!(
            "failed to strip {prefix:?} prefix from {path:?}: {err}"
        ))
    })
}