pub struct RegistryAccess<'r, Ctx, T> { /* private fields */ }Implementations§
Source§impl<'r, Ctx: EvalType, T: EvalType> RegistryAccess<'r, Ctx, T>
impl<'r, Ctx: EvalType, T: EvalType> RegistryAccess<'r, Ctx, T>
pub fn register_type<T2: EvalType>(&mut self) -> Result<()>
pub fn register_cast<To>(
&mut self,
cast_fn: for<'a> fn(&'a Ctx, T::RefType<'a>) -> To::RefType<'a>,
) -> Result<()>where
To: EvalType,
pub fn register_un_op( &mut self, op: UnOp, un_op_fn: for<'a> fn(&'a Ctx, T::RefType<'a>) -> T::RefType<'a>, ) -> Result<()>
pub fn register_bin_op( &mut self, op: BinOp, bin_op_fn: for<'a> fn(&'a Ctx, T::RefType<'a>, T::RefType<'a>) -> T::RefType<'a>, ) -> Result<()>
pub fn register_field_access<Field>( &mut self, field: &'static str, getter: for<'a> fn(&'a T) -> Field::RefType<'a>, ) -> Result<()>
Source§impl<'r, Ctx, T> RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> RegistryAccess<'r, Ctx, T>
pub fn register_method_call_0<Ret>(
&mut self,
method: &'static str,
method_fn: for<'a> fn(&'a T) -> Ret::RefType<'a>,
) -> Result<()>where
Ret: EvalType,
pub fn register_method_call_1<A1, Ret>( &mut self, method: &'static str, method_fn: for<'a> fn(&'a T, A1::RefType<'a>) -> Ret::RefType<'a>, ) -> Result<()>
pub fn register_method_call_2<A1, A2, Ret>( &mut self, method: &'static str, method_fn: for<'a> fn(&'a T, A1::RefType<'a>, A2::RefType<'a>) -> Ret::RefType<'a>, ) -> Result<()>
pub fn register_method_call_3<A1, A2, A3, Ret>( &mut self, method: &'static str, method_fn: for<'a> fn(&'a T, A1::RefType<'a>, A2::RefType<'a>, A3::RefType<'a>) -> Ret::RefType<'a>, ) -> Result<()>
pub fn register_method_call_4<A1, A2, A3, A4, Ret>( &mut self, method: &'static str, method_fn: for<'a> fn(&'a T, A1::RefType<'a>, A2::RefType<'a>, A3::RefType<'a>, A4::RefType<'a>) -> Ret::RefType<'a>, ) -> Result<()>
pub fn register_method_call_5<A1, A2, A3, A4, A5, Ret>( &mut self, method: &'static str, method_fn: for<'a> fn(&'a T, A1::RefType<'a>, A2::RefType<'a>, A3::RefType<'a>, A4::RefType<'a>, A5::RefType<'a>) -> Ret::RefType<'a>, ) -> Result<()>
Auto Trait Implementations§
impl<'r, Ctx, T> Freeze for RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> !RefUnwindSafe for RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> !Send for RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> !Sync for RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> Unpin for RegistryAccess<'r, Ctx, T>
impl<'r, Ctx, T> !UnwindSafe for RegistryAccess<'r, Ctx, T>
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