pub struct InferResult { /* private fields */ }Implementations§
Source§impl InferResult
impl InferResult
pub fn new() -> Self
Sourcepub fn from_fact(fact: &Fact) -> Self
pub fn from_fact(fact: &Fact) -> Self
将 fact 同时记入展示行与 Self::inferred_facts。
pub fn is_empty(&self) -> bool
Sourcepub fn infer_lines(&self) -> &[String]
pub fn infer_lines(&self) -> &[String]
用于 CLI / JSON infer_facts:按顺序的文本行(含 new_fact 写入的事实字符串与 new_with_msg 的文本)。
Sourcepub fn infer_lines_unique_in_order(&self) -> Vec<String>
pub fn infer_lines_unique_in_order(&self) -> Vec<String>
Same as Self::infer_lines but drops repeated strings while keeping first occurrence order (for JSON / CLI).
Sourcepub fn inferred_facts(&self) -> &[Fact]
pub fn inferred_facts(&self) -> &[Fact]
结构化推断事实(与 Self::infer_lines 中由事实产生的行对应)。
pub fn join_infer_lines(&self, sep: &str) -> String
pub fn new_with_msg(&mut self, msg: String)
pub fn new_fact(&mut self, fact: &Fact)
pub fn push_atomic_fact(&mut self, atomic_fact: &AtomicFact)
pub fn new_infer_result_inside(&mut self, other_infer_result: InferResult)
Trait Implementations§
Source§impl Clone for InferResult
impl Clone for InferResult
Source§fn clone(&self) -> InferResult
fn clone(&self) -> InferResult
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 moreAuto Trait Implementations§
impl Freeze for InferResult
impl RefUnwindSafe for InferResult
impl !Send for InferResult
impl !Sync for InferResult
impl Unpin for InferResult
impl UnsafeUnpin for InferResult
impl UnwindSafe for InferResult
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