pub struct OnionLambdaDefinition { /* private fields */ }
Expand description
Onion 虚拟机 Lambda 定义。
封装参数、捕获、Lambda 体、签名、类型等。
Implementations§
Source§impl OnionLambdaDefinition
impl OnionLambdaDefinition
pub fn new_static( parameter: LambdaParameter, body: LambdaBody, capture: OnionFastMap<Box<str>, OnionObject>, signature: Box<str>, lambda_type: LambdaType, ) -> OnionStaticObject
pub fn new_static_with_self( parameter: LambdaParameter, body: LambdaBody, capture: OnionFastMap<Box<str>, OnionObject>, self_object: &OnionObject, signature: Box<str>, lambda_type: LambdaType, ) -> OnionStaticObject
pub fn create_key_pool(&self) -> OnionKeyPool<Box<str>>
pub fn with_lambda_type(&self, lambda_type: LambdaType) -> Self
pub fn lambda_type(&self) -> &LambdaType
pub fn create_runnable( &self, argument: &OnionFastMap<Box<str>, OnionStaticObject>, this_lambda: &OnionStaticObject, self_object: &OnionObject, gc: &mut GC<OnionObjectCell>, ) -> Result<Box<dyn Runnable>, RuntimeError>
pub fn get_signature(&self) -> &str
pub fn get_parameter(&self) -> &LambdaParameter
pub fn get_flatten_param_keys(&self) -> &[Box<str>]
pub fn get_flatten_param_constraints(&self) -> &[OnionObject]
pub fn get_capture(&self) -> &OnionFastMap<Box<str>, OnionObject>
pub fn get_body(&self) -> &LambdaBody
pub fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>)
pub fn with_attribute<F, R>( &self, key: &OnionObject, f: &F, ) -> Result<R, RuntimeError>
Trait Implementations§
Source§impl Debug for OnionLambdaDefinition
impl Debug for OnionLambdaDefinition
Auto Trait Implementations§
impl Freeze for OnionLambdaDefinition
impl !RefUnwindSafe for OnionLambdaDefinition
impl Send for OnionLambdaDefinition
impl Sync for OnionLambdaDefinition
impl Unpin for OnionLambdaDefinition
impl !UnwindSafe for OnionLambdaDefinition
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