pinecone_sdk/models/
namespace.rs

1/// The namespace of an index
2#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, PartialOrd, Ord)]
3pub struct Namespace {
4    /// The name of the namespace
5    pub name: String,
6}
7
8impl From<String> for Namespace {
9    fn from(name: String) -> Self {
10        Self { name }
11    }
12}
13
14impl From<&str> for Namespace {
15    fn from(name: &str) -> Self {
16        Self {
17            name: name.to_string(),
18        }
19    }
20}