Struct jlrs::extensions::multitask::async_frame::AsyncGcFrame [−][src]
pub struct AsyncGcFrame<'frame> { /* fields omitted */ }
Expand description
A frame is used to root Julia data, which guarantees the garbage collector doesn’t free the
data while the frame has not been dropped. More information about this topic can be found in
the memory
module.
An AsyncGcFrame
offers the same functionality as a GcFrame
, and some additional async
methods that can be used to create nested async scopes. It can also be used to call the trait
methods of CallAsync
.
Implementations
pub async fn async_value_scope<'nested, 'data, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<Value<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputValue<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_value_scope<'nested, 'data, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<Value<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputValue<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
An async version of Scope::value_scope
. Rather than a closure, it takes an async
closure that provides a new AsyncGcFrame
.
pub async fn async_value_scope_with_slots<'nested, 'data, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<Value<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputValue<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_value_scope_with_slots<'nested, 'data, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<Value<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputValue<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
An async version of Scope::value_scope_with_slots
. Rather than a closure, it takes an
async closure that provides a new AsyncGcFrame
.
pub async fn async_result_scope<'nested, 'data, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<JuliaResult<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputResult<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_result_scope<'nested, 'data, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<JuliaResult<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputResult<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
An async version of Scope::result_scope
. Rather than a closure, it takes an async
closure that provides a new AsyncGcFrame
.
pub async fn async_result_scope_with_slots<'nested, 'data, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<JuliaResult<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputResult<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_result_scope_with_slots<'nested, 'data, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<JuliaResult<'frame, 'data>> where
G: Future<Output = JlrsResult<OutputResult<'frame, 'data, 'nested>>>,
F: FnOnce(Output<'frame>, &'nested mut AsyncGcFrame<'nested>) -> G,
An async version of Scope::result_scope_with_slots
. Rather than a closure, it takes an
async closure that provides a new AsyncGcFrame
.
pub async fn async_scope<'nested, T, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<T> where
T: 'frame,
G: Future<Output = JlrsResult<T>>,
F: FnOnce(&'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_scope<'nested, T, F, G>(
&'nested mut self,
func: F
) -> JlrsResult<T> where
T: 'frame,
G: Future<Output = JlrsResult<T>>,
F: FnOnce(&'nested mut AsyncGcFrame<'nested>) -> G,
An async version of ScopeExt::scope
. Rather than a closure, it takes an async closure
that provides a new AsyncGcFrame
.
pub async fn async_scope_with_slots<'nested, T, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<T> where
T: 'frame,
G: Future<Output = JlrsResult<T>>,
F: FnOnce(&'nested mut AsyncGcFrame<'nested>) -> G,
pub async fn async_scope_with_slots<'nested, T, F, G>(
&'nested mut self,
capacity: usize,
func: F
) -> JlrsResult<T> where
T: 'frame,
G: Future<Output = JlrsResult<T>>,
F: FnOnce(&'nested mut AsyncGcFrame<'nested>) -> G,
An async version of ScopeExt::scope_with_slots
. Rather than a closure, it takes an
async closure that provides a new AsyncGcFrame
.
Trait Implementations
Auto Trait Implementations
impl<'frame> !RefUnwindSafe for AsyncGcFrame<'frame>
impl<'frame> !Send for AsyncGcFrame<'frame>
impl<'frame> !Sync for AsyncGcFrame<'frame>
impl<'frame> Unpin for AsyncGcFrame<'frame>
impl<'frame> !UnwindSafe for AsyncGcFrame<'frame>
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true
if the GC is enabled.
Force a collection.
Insert a safepoint, a point where the garbage collector may run.