pub struct SearchArtifactKey { /* private fields */ }Expand description
Canonical normalized identity of one search artifact.
Implementations§
Source§impl SearchArtifactKey
impl SearchArtifactKey
Sourcepub fn text<I, S>(
label: &str,
properties: I,
) -> Result<Self, SearchArtifactError>
pub fn text<I, S>( label: &str, properties: I, ) -> Result<Self, SearchArtifactError>
Construct a text key. Property names are trimmed, sorted, and deduplicated.
§Errors
Returns SearchArtifactError::InvalidSelector for empty, control-
containing, overlong, or collectively oversized selectors.
Sourcepub fn vector(label: &str, space: &str) -> Result<Self, SearchArtifactError>
pub fn vector(label: &str, space: &str) -> Result<Self, SearchArtifactError>
Construct a vector key for one required label and normalized space.
§Errors
Returns SearchArtifactError::InvalidSelector for an invalid selector.
Sourcepub const fn kind(&self) -> SearchIndexKind
pub const fn kind(&self) -> SearchIndexKind
Backend kind.
Sourcepub fn properties(&self) -> Option<&[String]>
pub fn properties(&self) -> Option<&[String]>
Canonical sorted text properties.
Sourcepub fn artifact_root(&self, project_dir: &Path) -> PathBuf
pub fn artifact_root(&self, project_dir: &Path) -> PathBuf
Collision-free, filesystem-safe root for this key.
Trait Implementations§
Source§impl Clone for SearchArtifactKey
impl Clone for SearchArtifactKey
Source§impl Debug for SearchArtifactKey
impl Debug for SearchArtifactKey
impl Eq for SearchArtifactKey
Source§impl PartialEq for SearchArtifactKey
impl PartialEq for SearchArtifactKey
impl StructuralPartialEq for SearchArtifactKey
Auto Trait Implementations§
impl Freeze for SearchArtifactKey
impl RefUnwindSafe for SearchArtifactKey
impl Send for SearchArtifactKey
impl Sync for SearchArtifactKey
impl Unpin for SearchArtifactKey
impl UnsafeUnpin for SearchArtifactKey
impl UnwindSafe for SearchArtifactKey
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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