pub struct Collective {
pub id: CollectiveId,
pub name: String,
pub owner_id: Option<String>,
pub embedding_dimension: u16,
pub created_at: Timestamp,
pub updated_at: Timestamp,
}Expand description
A collective — an isolated namespace for agent experiences.
Collectives provide multi-tenancy: each project or team gets its own collective with its own experiences and vector index.
§Fields
id— Unique identifier (UUID v7, time-ordered)name— Human-readable name (e.g., “my-project”)owner_id— Optional owner for multi-tenant filteringembedding_dimension— Vector dimension locked at creation (e.g., 384, 768)created_at/updated_at— Lifecycle timestamps
§Serialization
Collectives are serialized with bincode for compact storage in redb.
The Serialize/Deserialize derives enable this automatically.
Fields§
§id: CollectiveIdUnique identifier (UUID v7).
name: StringHuman-readable name.
owner_id: Option<String>Optional owner identifier for multi-tenancy.
When set, enables filtering collectives by owner via
list_collectives_by_owner().
embedding_dimension: u16Embedding vector dimension for this collective.
All experiences in this collective must have embeddings with exactly this many dimensions. Locked at creation time.
created_at: TimestampWhen this collective was created.
updated_at: TimestampWhen this collective was last modified.
Implementations§
Trait Implementations§
Source§impl Clone for Collective
impl Clone for Collective
Source§fn clone(&self) -> Collective
fn clone(&self) -> Collective
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 Collective
impl Debug for Collective
Source§impl<'de> Deserialize<'de> for Collective
impl<'de> Deserialize<'de> for Collective
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Collective
impl RefUnwindSafe for Collective
impl Send for Collective
impl Sync for Collective
impl Unpin for Collective
impl UnsafeUnpin for Collective
impl UnwindSafe for Collective
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