pub enum MemoryType {
Decision,
Discovery,
Bugfix,
Architecture,
Lesson,
Preference,
Procedure,
SessionActivity,
}Variants§
Implementations§
Source§impl MemoryType
impl MemoryType
pub const ALL: [Self; 8]
pub const fn as_str(self) -> &'static str
pub const fn label(self) -> &'static str
pub const fn index_order(self) -> Option<usize>
pub const fn is_indexed(self) -> bool
pub const fn is_core(self) -> bool
pub const fn weight(self) -> f64
pub const fn auto_promote(self) -> bool
pub fn parse(value: &str) -> Option<Self>
Sourcepub fn from_observation_type(observation_type: &str) -> Option<Self>
pub fn from_observation_type(observation_type: &str) -> Option<Self>
Map a raw observation_type (the legal observation vocabulary lives in
crate::db::models::OBSERVATION_TYPES: bugfix/feature/refactor/discovery/
decision/change) onto the candidate MemoryType it can support.
The candidate vocabulary and the observation vocabulary are different
word lists, so a raw string-equality comparison between them is wrong:
architecture is a valid candidate type but never a valid observation
type, so an architecture candidate could never be matched and could
never auto-promote. feature/refactor/change observations all
describe project discoveries, so they collapse onto Discovery.
Sourcepub fn supports_observation_type(self, observation_type: &str) -> bool
pub fn supports_observation_type(self, observation_type: &str) -> bool
Whether an observation of observation_type can serve as supporting
evidence for a candidate of self. Auto-promotable candidate types are
matched to their observation equivalent; Architecture candidates have
no observation equivalent, so they accept Discovery-class evidence
(the closest project-knowledge observation class).
Trait Implementations§
Source§impl Clone for MemoryType
impl Clone for MemoryType
Source§fn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MemoryType
Source§impl Debug for MemoryType
impl Debug for MemoryType
impl Eq for MemoryType
Source§impl Hash for MemoryType
impl Hash for MemoryType
Source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnsafeUnpin for MemoryType
impl UnwindSafe for MemoryType
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,
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§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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more