pub struct OnionAsyncHandle { /* private fields */ }
Expand description
Implementations§
Source§impl OnionAsyncHandle
impl OnionAsyncHandle
Sourcepub fn new(gc: &mut GC<OnionObjectCell>) -> (Arc<Self>, GCArcStorage)
pub fn new(gc: &mut GC<OnionObjectCell>) -> (Arc<Self>, GCArcStorage)
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Sourcepub fn set_result(&self, result: &OnionObject) -> Result<(), RuntimeError>
pub fn set_result(&self, result: &OnionObject) -> Result<(), RuntimeError>
Sourcepub fn set_finished(&self)
pub fn set_finished(&self)
仅设置任务为完成状态,不写入结果。
适用于无返回值的异步任务。
Trait Implementations§
Source§impl Debug for OnionAsyncHandle
impl Debug for OnionAsyncHandle
Source§impl OnionObjectExt for OnionAsyncHandle
impl OnionObjectExt for OnionAsyncHandle
fn as_any(&self) -> &dyn Any
fn repr(&self, _ptrs: &Vec<*const OnionObject>) -> Result<String, RuntimeError>
fn equals(&self, _other: &OnionObject) -> Result<bool, RuntimeError>
fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>)
fn to_boolean(&self) -> Result<bool, RuntimeError>
fn type_of(&self) -> Result<String, RuntimeError>
fn value_of(&self) -> Result<OnionStaticObject, RuntimeError>
fn to_string( &self, ptrs: &Vec<*const OnionObject>, ) -> Result<String, RuntimeError>
fn with_attribute( &self, key: &OnionObject, f: &mut dyn FnMut(&OnionObject) -> Result<(), RuntimeError>, ) -> Result<(), RuntimeError>
fn to_integer(&self) -> Result<i64, RuntimeError>
fn to_float(&self) -> Result<f64, RuntimeError>
fn to_bytes(&self) -> Result<Box<[u8]>, RuntimeError>
fn len(&self) -> Result<OnionStaticObject, RuntimeError>
fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError>
fn apply(&self, value: &OnionObject) -> Result<OnionStaticObject, RuntimeError>
fn key_of(&self) -> Result<OnionStaticObject, RuntimeError>
fn binary_eq(&self, other: &OnionObject) -> Result<bool, RuntimeError>
fn binary_lt(&self, other: &OnionObject) -> Result<bool, RuntimeError>
fn binary_gt(&self, other: &OnionObject) -> Result<bool, RuntimeError>
fn binary_add( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_sub( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_mul( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_div( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_mod( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_pow( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_and( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_or( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_xor( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_shl( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn binary_shr( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
fn unary_neg(&self) -> Result<OnionStaticObject, RuntimeError>
fn unary_plus(&self) -> Result<OnionStaticObject, RuntimeError>
fn unary_not(&self) -> Result<OnionStaticObject, RuntimeError>
Auto Trait Implementations§
impl !Freeze for OnionAsyncHandle
impl RefUnwindSafe for OnionAsyncHandle
impl Send for OnionAsyncHandle
impl Sync for OnionAsyncHandle
impl Unpin for OnionAsyncHandle
impl UnwindSafe for OnionAsyncHandle
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