Skip to main content

MemoryContextError

Enum MemoryContextError 

Source
pub enum MemoryContextError {
Show 20 variants SessionMismatch, NotSessionLeaseMode { mode: MemoryContextMode, }, NotOneShotMode { mode: MemoryContextMode, }, OneShotAlreadyPending { lease_id: MemoryLeaseId, }, OneShotAlreadyConsumed { lease_id: MemoryLeaseId, }, NoPendingRecall, LeaseExpired { lease_id: MemoryLeaseId, }, InvalidExpiry, InvalidIdentifier { field: &'static str, }, RequiresHostConfirmation, CapabilityUnavailable, ProviderNotRegistered, ProviderAmbiguous, ContributionProjectMismatch, ContributionOutOfBounds { field: &'static str, }, ContributionDuplicateMemoryId, ContributionMalformed { field: &'static str, }, ContributionWithheldContent, ContributionClassNotPermitted, RecallBudgetBelowMinimum,
}
Expand description

Typed memory-context failure. Deliberately content-free (spec §19: no content-bearing errors): only host-minted identities and static field names appear.

Variants§

§

SessionMismatch

The lease or revocation targets a different session.

§

NotSessionLeaseMode

install requires a session-lease mode (RecallEachPrompt, CaptureOnly, CaptureAndRecall).

Fields

§mode: MemoryContextMode

The rejected mode.

§

NotOneShotMode

install_one_shot requires RecallOnce.

Fields

§mode: MemoryContextMode

The rejected mode.

§

OneShotAlreadyPending

A one-shot recall is already pending; consume or revoke it first.

Fields

§lease_id: MemoryLeaseId

The pending lease identity.

§

OneShotAlreadyConsumed

This one-shot lease was already consumed; retries cannot recall twice.

Fields

§lease_id: MemoryLeaseId

The consumed lease identity.

§

NoPendingRecall

No one-shot recall is pending.

§

LeaseExpired

The lease is expired.

Fields

§lease_id: MemoryLeaseId

The expired lease identity.

§

InvalidExpiry

expires_at is not strictly after granted_at.

§

InvalidIdentifier

A boundary identifier was empty, oversized, or contained control characters.

Fields

§field: &'static str

Static name of the offending field.

§

RequiresHostConfirmation

The requested transition can only be committed under deterministic, host-owned proof of user intent (spec §6.3 ExplicitCommand from the /memory frontend command, task A5). A model tool call is a proposal (spec §7.2 rules) and cannot carry such proof through JSON parameters, so it is refused without installing any lease.

§

CapabilityUnavailable

No memory-context capability is wired into this execution context; lease-granting actions are unavailable and nothing was mutated.

§

ProviderNotRegistered

Enable-time provider validation failed (task A6, spec §7.1): no loaded extension declares the requested context provider as a validated deferred.context_providers capability. Fail closed — nothing was granted.

§

ProviderAmbiguous

Enable-time provider validation failed (task A6): more than one installed extension declares an overlapping context-provider capability and no explicit provider id disambiguates the request. Fail closed — the host never picks one arbitrarily, and nothing was granted.

§

ContributionProjectMismatch

A recall contribution’s project identity does not match the host’s expected project (spec §5.2 isolation) — rejected fail-closed, the contribution never influences budgeting or request assembly.

§

ContributionOutOfBounds

A recall contribution exceeded a spec §10.3 bound (record count, per-record size, or engine-provided rendered budget). Content-free: only the static field name is carried.

Fields

§field: &'static str

Static name of the offending field.

§

ContributionDuplicateMemoryId

A recall contribution repeated a memory_id across its records (spec §6.5). Rejected fail-closed: duplicates defeat per-record accounting and supersession semantics. Content-free by design.

§

ContributionMalformed

A provider recall response did not parse as the bounded §6.5 wire shape (missing/mistyped field or out-of-vocabulary enum value). Content-free: only the static field name is carried; the recall path fails OPEN on it (task B4 — the turn proceeds without memory).

Fields

§field: &'static str

Static name of the offending wire field.

§

ContributionWithheldContent

A contribution record carried a NON-EMPTY body under a disclosure class that gate_for_model withholds from model context (spec §5.5 / §14.2). Defense in depth: a correct provider never includes withheld content at all, so the whole contribution is rejected. Content-free by design — the withheld body never appears in the error.

§

ContributionClassNotPermitted

A contribution record’s disclosure class is not in the originating recall request’s DisclosureGrantSet (spec §6.4 permitted_classes): a provider cannot volunteer classes the host never authorized. Content-free by design.

§

RecallBudgetBelowMinimum

The computed §10.3 recall budget is below the minimum useful floor — recall is skipped rather than reducing core reserves; nothing was held.

Trait Implementations§

Source§

impl Clone for MemoryContextError

Source§

fn clone(&self) -> MemoryContextError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryContextError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MemoryContextError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MemoryContextError

Source§

impl Error for MemoryContextError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for MemoryContextError

Source§

fn eq(&self, other: &MemoryContextError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MemoryContextError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more