pub struct EntityBuilder { /* private fields */ }Expand description
Builder for Entity with fluent API.
Implementations§
Source§impl EntityBuilder
impl EntityBuilder
Sourcepub fn new(entity_type: EntityType, name: String, content: String) -> Self
pub fn new(entity_type: EntityType, name: String, content: String) -> Self
Create a new builder.
Sourcepub fn with_metadata(self, key: String, value: String) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
Add metadata key-value pair.
Sourcepub fn with_embedding(self, embedding: Vec<f32>) -> Self
pub fn with_embedding(self, embedding: Vec<f32>) -> Self
Set embedding.
Sourcepub fn with_created_at(self, created_at: DateTime<Utc>) -> Self
pub fn with_created_at(self, created_at: DateTime<Utc>) -> Self
Set creation timestamp (for DST).
Sourcepub fn with_updated_at(self, updated_at: DateTime<Utc>) -> Self
pub fn with_updated_at(self, updated_at: DateTime<Utc>) -> Self
Set update timestamp (for DST).
Sourcepub fn with_document_time(self, document_time: DateTime<Utc>) -> Self
pub fn with_document_time(self, document_time: DateTime<Utc>) -> Self
Set document time (when source was created).
Sourcepub fn with_event_time(self, event_time: DateTime<Utc>) -> Self
pub fn with_event_time(self, event_time: DateTime<Utc>) -> Self
Set event time (when event actually occurred).
Sourcepub fn with_source_ref(self, source_ref: SourceRef) -> Self
pub fn with_source_ref(self, source_ref: SourceRef) -> Self
Set source reference (for multimedia content).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntityBuilder
impl RefUnwindSafe for EntityBuilder
impl Send for EntityBuilder
impl Sync for EntityBuilder
impl Unpin for EntityBuilder
impl UnwindSafe for EntityBuilder
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