pub struct TaskHandle(/* private fields */);Expand description
A cloneable, shareable handle to an optional GantzTask, suitable for
storage in node state or transfer along graph edges as an opaque
SteelVal.
Cloning shares the underlying cell. Steel’s FromSteelVal for custom
types clones, so a handle extracted from the VM still refers to the same
task. The result is delivered exactly once. TaskHandle::check consumes
the result on completion. When several holders share the cell, only the
first holder checked after completion delivers. The rest observe None.
TaskHandle::take and TaskHandle::cancel remove the task from every
clone at once.
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn take(&self) -> Option<GantzTask>
pub fn take(&self) -> Option<GantzTask>
Take the task out of the handle, leaving None for every clone.
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§impl Custom for TaskHandle
impl Custom for TaskHandle
fn fmt(&self) -> Option<Result<String, Error>>
fn into_serializable_steelval(&mut self) -> Option<SerializableSteelVal>
fn as_iterator(&self) -> Option<Box<dyn Iterator<Item = SteelVal>>>
fn gc_drop_mut(&mut self, _drop_handler: &mut IterativeDropHandler<'_>)
fn gc_visit_children(&self, _context: &mut MarkAndSweepContext<'_>)
fn visit_equality(&self, _visitor: &mut EqualityVisitor<'_>)
fn equality_hint(&self, _other: &dyn CustomType) -> bool
fn equality_hint_general(&self, _other: &SteelVal) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for TaskHandle
impl !Send for TaskHandle
impl !Sync for TaskHandle
impl !UnwindSafe for TaskHandle
impl Freeze for TaskHandle
impl Unpin for TaskHandle
impl UnsafeUnpin for TaskHandle
Blanket Implementations§
Source§impl<T> AsRefMutSteelVal for Twhere
T: CustomType + MaybeSendSyncStatic,
impl<T> AsRefMutSteelVal for Twhere
T: CustomType + MaybeSendSyncStatic,
Source§impl<T> AsRefSteelVal for Twhere
T: CustomType + MaybeSendSyncStatic,
impl<T> AsRefSteelVal for Twhere
T: CustomType + MaybeSendSyncStatic,
Source§impl<T> AsRefSteelValFromUnsized<T> for Twhere
T: FromSteelVal + Clone,
impl<T> AsRefSteelValFromUnsized<T> for Twhere
T: FromSteelVal + Clone,
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomType for Twhere
T: Custom + MaybeSendSyncStatic,
impl<T> CustomType for Twhere
T: Custom + MaybeSendSyncStatic,
fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref_mut(&mut self) -> &mut (dyn Any + 'static)
fn inner_type_id(&self) -> TypeId
fn display(&self) -> Result<String, Error>
fn as_serializable_steelval(&mut self) -> Option<SerializableSteelVal>
fn drop_mut(&mut self, drop_handler: &mut IterativeDropHandler<'_>)
fn visit_children(&self, context: &mut MarkAndSweepContext<'_>)
fn visit_children_for_equality(&self, visitor: &mut EqualityVisitor<'_>)
fn check_equality_hint(&self, other: &dyn CustomType) -> bool
fn check_equality_hint_general(&self, other: &SteelVal) -> bool
fn into_error_(self) -> Result<SteelErr, T>where
T: Sized,
fn name(&self) -> &str
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FromSteelVal for Twhere
T: CustomType + Clone + 'static,
impl<T> FromSteelVal for Twhere
T: CustomType + Clone + 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.