pub struct CaptureRequest {
pub content: String,
pub namespace: Namespace,
pub domain: Domain,
pub tags: Vec<String>,
pub source: Option<String>,
pub skip_security_check: bool,
pub ttl_seconds: Option<u64>,
pub scope: Option<DomainScope>,
pub group_id: Option<String>,
}Expand description
Request to capture a new memory.
Fields§
§content: StringThe content to capture.
namespace: NamespaceTarget namespace for the memory.
domain: DomainTarget domain for the memory.
Optional tags for categorization.
source: Option<String>Optional source reference.
skip_security_check: boolWhether to skip security filtering.
ttl_seconds: Option<u64>Optional time-to-live in seconds.
When set, expires_at is calculated as created_at + ttl_seconds.
None means no expiration (memory lives until manually deleted).
scope: Option<DomainScope>Target storage scope for the memory.
Project/User: Stored in user-local index (default)Org: Stored in organization-shared index (requires org feature enabled)
Default: None (uses context-appropriate scope based on git status)
group_id: Option<String>Optional group identifier for group-scoped memories.
When set, the memory is associated with a specific group and requires write permission to that group. Group-scoped memories are visible to all group members during recall.
Implementations§
Source§impl CaptureRequest
impl CaptureRequest
Sourcepub fn new(content: impl Into<String>) -> Self
pub fn new(content: impl Into<String>) -> Self
Creates a new capture request with the given content.
Sourcepub const fn with_namespace(self, namespace: Namespace) -> Self
pub const fn with_namespace(self, namespace: Namespace) -> Self
Sets the namespace.
Sourcepub fn with_domain(self, domain: Domain) -> Self
pub fn with_domain(self, domain: Domain) -> Self
Sets the domain.
Sourcepub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
Sets the source reference.
Sourcepub const fn with_ttl(self, ttl_seconds: u64) -> Self
pub const fn with_ttl(self, ttl_seconds: u64) -> Self
Sets the time-to-live in seconds.
The memory will expire after this duration from creation time.
None means no expiration.
Sourcepub const fn with_scope(self, scope: DomainScope) -> Self
pub const fn with_scope(self, scope: DomainScope) -> Self
Sets the storage scope for the memory.
Project/User: Stored in user-local indexOrg: Stored in organization-shared index
Sourcepub fn with_group_id(self, group_id: impl Into<String>) -> Self
pub fn with_group_id(self, group_id: impl Into<String>) -> Self
Sets the group identifier for group-scoped memories.
When set, the memory is associated with a specific group and requires write permission to that group.
Trait Implementations§
Source§impl Clone for CaptureRequest
impl Clone for CaptureRequest
Source§fn clone(&self) -> CaptureRequest
fn clone(&self) -> CaptureRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CaptureRequest
impl Debug for CaptureRequest
Source§impl Default for CaptureRequest
impl Default for CaptureRequest
Source§fn default() -> CaptureRequest
fn default() -> CaptureRequest
Auto Trait Implementations§
impl Freeze for CaptureRequest
impl RefUnwindSafe for CaptureRequest
impl Send for CaptureRequest
impl Sync for CaptureRequest
impl Unpin for CaptureRequest
impl UnwindSafe for CaptureRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].