pub struct Learning {
pub learning_id: LearningId,
pub observation_id: ObservationId,
pub learning_type: LearningType,
pub content: String,
pub abstraction_level: AbstractionLevel,
pub applicability: Option<String>,
pub confidence: f32,
pub created_at: Timestamp,
}Expand description
A learning extracted from an observation.
Fields§
§learning_id: LearningIdUnique identifier for this learning
observation_id: ObservationIdObservation this came from
learning_type: LearningTypeType of learning
content: StringContent of the learning
abstraction_level: AbstractionLevelLevel of abstraction
applicability: Option<String>Where this learning applies
confidence: f32Confidence in this learning
created_at: TimestampWhen this was learned
Implementations§
Source§impl Learning
impl Learning
Sourcepub fn new(
observation_id: ObservationId,
learning_type: LearningType,
content: impl Into<String>,
) -> Self
pub fn new( observation_id: ObservationId, learning_type: LearningType, content: impl Into<String>, ) -> Self
Create a new learning.
Sourcepub fn with_abstraction(self, level: AbstractionLevel) -> Self
pub fn with_abstraction(self, level: AbstractionLevel) -> Self
Set abstraction level.
Sourcepub fn with_applicability(self, applicability: impl Into<String>) -> Self
pub fn with_applicability(self, applicability: impl Into<String>) -> Self
Set applicability.
Sourcepub fn with_confidence(self, confidence: f32) -> Self
pub fn with_confidence(self, confidence: f32) -> Self
Set confidence.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Learning
impl<'de> Deserialize<'de> for Learning
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Learning
Auto Trait Implementations§
impl Freeze for Learning
impl RefUnwindSafe for Learning
impl Send for Learning
impl Sync for Learning
impl Unpin for Learning
impl UnwindSafe for Learning
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