pub struct CollectionId(/* private fields */);Expand description
Unique identifier for a collection in the database.
CollectionId wraps a u64 and provides type safety to prevent accidentally
using a collection ID where an entity or edge ID is expected.
Collections are named containers for entities with associated vector configurations. Each collection defines named vector spaces with their dimensions, distance metrics, and index configurations.
§Example
use manifoldb_core::CollectionId;
let id = CollectionId::new(42);
assert_eq!(id.as_u64(), 42);
println!("{}", id); // Prints: CollectionId(42)Implementations§
Source§impl CollectionId
impl CollectionId
Trait Implementations§
Source§impl Clone for CollectionId
impl Clone for CollectionId
Source§fn clone(&self) -> CollectionId
fn clone(&self) -> CollectionId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollectionId
impl Debug for CollectionId
Source§impl<'de> Deserialize<'de> for CollectionId
impl<'de> Deserialize<'de> for CollectionId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollectionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CollectionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CollectionId
impl Display for CollectionId
Source§impl From<u64> for CollectionId
impl From<u64> for CollectionId
Source§fn from(id: u64) -> CollectionId
fn from(id: u64) -> CollectionId
Converts to this type from the input type.
Source§impl Hash for CollectionId
impl Hash for CollectionId
Source§impl Ord for CollectionId
impl Ord for CollectionId
Source§fn cmp(&self, other: &CollectionId) -> Ordering
fn cmp(&self, other: &CollectionId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CollectionId
impl PartialEq for CollectionId
Source§impl PartialOrd for CollectionId
impl PartialOrd for CollectionId
Source§impl Serialize for CollectionId
impl Serialize for CollectionId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for CollectionId
impl Eq for CollectionId
impl StructuralPartialEq for CollectionId
Auto Trait Implementations§
impl Freeze for CollectionId
impl RefUnwindSafe for CollectionId
impl Send for CollectionId
impl Sync for CollectionId
impl Unpin for CollectionId
impl UnwindSafe for CollectionId
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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