pub struct ContextCandidateV1 {
pub candidate_id: String,
pub task_id: String,
pub source_id: String,
pub kind: String,
pub relevance_milli: u16,
pub confidence_milli: u16,
pub freshness_milli: u16,
pub estimated_tokens: u64,
pub content_hash: String,
}Expand description
Ranked, content-addressed context candidate.
Fields§
§candidate_id: String§task_id: String§source_id: String§kind: String§relevance_milli: u16§confidence_milli: u16§freshness_milli: u16§estimated_tokens: u64§content_hash: StringImplementations§
Source§impl ContextCandidateV1
impl ContextCandidateV1
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate candidate ranking and freshness bounds.
Trait Implementations§
Source§impl Clone for ContextCandidateV1
impl Clone for ContextCandidateV1
Source§fn clone(&self) -> ContextCandidateV1
fn clone(&self) -> ContextCandidateV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextCandidateV1
impl Debug for ContextCandidateV1
Source§impl Default for ContextCandidateV1
impl Default for ContextCandidateV1
Source§fn default() -> ContextCandidateV1
fn default() -> ContextCandidateV1
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextCandidateV1
impl<'de> Deserialize<'de> for ContextCandidateV1
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 Eq for ContextCandidateV1
Source§impl PartialEq for ContextCandidateV1
impl PartialEq for ContextCandidateV1
Source§impl Serialize for ContextCandidateV1
impl Serialize for ContextCandidateV1
impl StructuralPartialEq for ContextCandidateV1
Auto Trait Implementations§
impl Freeze for ContextCandidateV1
impl RefUnwindSafe for ContextCandidateV1
impl Send for ContextCandidateV1
impl Sync for ContextCandidateV1
impl Unpin for ContextCandidateV1
impl UnsafeUnpin for ContextCandidateV1
impl UnwindSafe for ContextCandidateV1
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