pub struct PythonBodyPolicy {
pub body: Vec<String>,
pub signature: PythonSignature,
pub annotations: BTreeMap<String, Annotation>,
pub flags: PythonFunctionFlags,
pub traceback_origin: String,
pub call_error_class: String,
}Expand description
Python-owned body and diagnostic metadata.
Fields§
§body: Vec<String>Token body retained for direct evaluation.
signature: PythonSignaturePython signature defaults and binding policy.
annotations: BTreeMap<String, Annotation>Retained Python annotations.
flags: PythonFunctionFlagsGenerator, coroutine, and descriptor behavior flags.
traceback_origin: StringStable source origin used for Python tracebacks.
call_error_class: StringPython exception class used for call-binding failures.
Implementations§
Source§impl PythonBodyPolicy
impl PythonBodyPolicy
Sourcepub fn bind(
&self,
plan: &FunctionPlan,
call: &BoundCall,
) -> Result<BTreeMap<Symbol, Value>, PythonCallError>
pub fn bind( &self, plan: &FunctionPlan, call: &BoundCall, ) -> Result<BTreeMap<Symbol, Value>, PythonCallError>
Applies Python positional/named/default rules to a neutral lossless call record.
Trait Implementations§
Source§impl Clone for PythonBodyPolicy
impl Clone for PythonBodyPolicy
Source§fn clone(&self) -> PythonBodyPolicy
fn clone(&self) -> PythonBodyPolicy
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 PythonBodyPolicy
impl Debug for PythonBodyPolicy
Source§impl FunctionBodyPolicy for PythonBodyPolicy
impl FunctionBodyPolicy for PythonBodyPolicy
Source§fn invoke(
&self,
_cx: &mut Cx,
plan: &FunctionPlan,
_captures: &[CapturedBinding],
call: BoundCall,
) -> Result<Value>
fn invoke( &self, _cx: &mut Cx, plan: &FunctionPlan, _captures: &[CapturedBinding], call: BoundCall, ) -> Result<Value>
Executes this body using the immutable declaration and live captures.
Auto Trait Implementations§
impl !RefUnwindSafe for PythonBodyPolicy
impl !UnwindSafe for PythonBodyPolicy
impl Freeze for PythonBodyPolicy
impl Send for PythonBodyPolicy
impl Sync for PythonBodyPolicy
impl Unpin for PythonBodyPolicy
impl UnsafeUnpin for PythonBodyPolicy
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