Enum polar_core::events::QueryEvent
source · [−]pub enum QueryEvent {
Show 13 variants
None,
Done {
result: bool,
},
Run {
call_id: u64,
runnable: Box<dyn Runnable>,
},
Debug {
message: String,
},
MakeExternal {
instance_id: u64,
constructor: Term,
},
ExternalCall {
call_id: u64,
instance: Term,
attribute: Symbol,
args: Option<Vec<Term>>,
kwargs: Option<BTreeMap<Symbol, Term>>,
},
ExternalIsa {
call_id: u64,
instance: Term,
class_tag: Symbol,
},
ExternalIsaWithPath {
call_id: u64,
base_tag: Symbol,
path: TermList,
class_tag: Symbol,
},
ExternalIsSubSpecializer {
call_id: u64,
instance_id: u64,
left_class_tag: Symbol,
right_class_tag: Symbol,
},
ExternalIsSubclass {
call_id: u64,
left_class_tag: Symbol,
right_class_tag: Symbol,
},
Result {
bindings: Bindings,
trace: Option<TraceResult>,
},
ExternalOp {
call_id: u64,
operator: Operator,
args: TermList,
},
NextExternal {
call_id: u64,
iterable: Term,
},
}
Variants
None
Done
Fields
result: bool
This runnable is complete with result
.
Run
Run runnable
, and report the result to its parent using call_id
when it completes.
Debug
Fields
message: String
MakeExternal
ExternalCall
Fields
call_id: u64
Persistent id across all requests for results from the same external call.
instance: Term
The external instance to make this call on.
attribute: Symbol
Field name to lookup or method name to call. A class name indicates a constructor should be called.
ExternalIsa
Checks if the instance is an instance of (a subclass of) the class_tag.
ExternalIsaWithPath
Starting from base_tag
, traverse path
fields and check if the result is an instance of
class_tag
.
ExternalIsSubSpecializer
Checks if the left is more specific than right with respect to instance.
ExternalIsSubclass
Checks if left class tag is a subclass or the same class as right.
Result
ExternalOp
NextExternal
Trait Implementations
sourceimpl Clone for QueryEvent
impl Clone for QueryEvent
sourcefn clone(&self) -> QueryEvent
fn clone(&self) -> QueryEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for QueryEvent
impl Debug for QueryEvent
sourceimpl<'de> Deserialize<'de> for QueryEvent
impl<'de> Deserialize<'de> for QueryEvent
sourcefn 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
sourceimpl Serialize for QueryEvent
impl Serialize for QueryEvent
Auto Trait Implementations
impl !RefUnwindSafe for QueryEvent
impl !Send for QueryEvent
impl !Sync for QueryEvent
impl Unpin for QueryEvent
impl !UnwindSafe for QueryEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more