pub enum PinMode {
Always,
Retrieved,
}Expand description
Whether a Fact is always injected or only surfaced when a query
retrieves it — the one bit that splits the always-on tier from the
retrieval-gated tier.
The core does not inject anything itself; pin is metadata the higher
layers (the SDK grounding path) act on. crate::FactRegistry::pinned
filters the corpus by it, and both variants are ranked by
crate::FactRegistry::search all the same, so a pinned fact is still
discoverable by a query.
Variants§
Always
Always injected into the context, no ranking — the barbershop’s address, hours, brand voice. Kept tiny; it is paid for on every injection.
Retrieved
Injected only when a query ranks it in — pricing tables, per-service policies. The default: a new fact is retrieval-gated until promoted.
Implementations§
Trait Implementations§
impl Copy for PinMode
impl Eq for PinMode
Source§impl FromStr for PinMode
impl FromStr for PinMode
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse the SDK identifier: "always" or "retrieved".
§Errors
Any other string is a ParsePinModeError naming the rejected input.
§Examples
use ratel_ai_core::PinMode;
assert_eq!("always".parse::<PinMode>(), Ok(PinMode::Always));
assert_eq!("retrieved".parse::<PinMode>(), Ok(PinMode::Retrieved));
assert!("pinned".parse::<PinMode>().is_err());Source§type Err = ParsePinModeError
type Err = ParsePinModeError
impl StructuralPartialEq for PinMode
Auto Trait Implementations§
impl Freeze for PinMode
impl RefUnwindSafe for PinMode
impl Send for PinMode
impl Sync for PinMode
impl Unpin for PinMode
impl UnsafeUnpin for PinMode
impl UnwindSafe for PinMode
Blanket Implementations§
impl<T> Boilerplate for T
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more