pub struct RememberBuilder { /* private fields */ }Expand description
Phase 2.3: fluent builder for RememberOptions — replaces the 23-param
flat construction with a grouped-chain API.
ⓘ
let opts = RememberBuilder::new("cache rebuild needs token rotation")
.lesson(LessonMeta {
lesson_type: Some("success".into()),
lesson_scope: Some("session".into()),
..Default::default()
})
.session(SessionScope { run_id: Some(run_id), ..Default::default() })
.upsert("cache-rebuild-signer")
.build();
client.remember(opts).await?;Implementations§
Source§impl RememberBuilder
impl RememberBuilder
pub fn new(content: impl Into<String>) -> Self
pub fn lesson(self, meta: LessonMeta) -> Self
pub fn session(self, scope: SessionScope) -> Self
pub fn metadata(self, metadata: Value) -> Self
pub fn hints(self, hints: Value) -> Self
pub fn payload(self, payload: Value) -> Self
pub fn upsert(self, key: impl Into<String>) -> Self
pub fn intent(self, intent: impl Into<String>) -> Self
pub fn lane(self, lane: impl Into<String>) -> Self
pub fn source(self, source: impl Into<String>) -> Self
pub fn importance(self, importance: impl Into<String>) -> Self
pub fn occurrence_time(self, ts_seconds: i64) -> Self
pub fn idempotency_key(self, key: impl Into<String>) -> Self
pub fn wait(self, wait: bool) -> Self
pub fn timeout_ms(self, timeout_ms: u64) -> Self
Sourcepub fn build(self) -> RememberOptions
pub fn build(self) -> RememberOptions
Finalise and hand back the underlying RememberOptions. Call
client.remember(builder.build()).await? to submit.
Auto Trait Implementations§
impl Freeze for RememberBuilder
impl RefUnwindSafe for RememberBuilder
impl Send for RememberBuilder
impl Sync for RememberBuilder
impl Unpin for RememberBuilder
impl UnsafeUnpin for RememberBuilder
impl UnwindSafe for RememberBuilder
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request