Skip to main content

WorkflowOutboundValue

Trait WorkflowOutboundValue 

Source
pub trait WorkflowOutboundValue: Any {
    // Required methods
    fn as_any(&self) -> &(dyn Any + 'static);
    fn into_any(self: Box<Self>) -> Box<dyn Any>;
}
Expand description

Type-erased output returned by an intercepted outbound workflow call.

Required Methods§

Source

fn as_any(&self) -> &(dyn Any + 'static)

Access the concrete value through Any.

Source

fn into_any(self: Box<Self>) -> Box<dyn Any>

Convert this value into Any for a consuming downcast.

Implementations§

Source§

impl dyn WorkflowOutboundValue

Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: Any,

Attempt to access the output as a concrete type.

Source

pub fn downcast<T>( self: Box<dyn WorkflowOutboundValue>, ) -> Result<Box<T>, Box<dyn Any>>
where T: Any,

Attempt to convert the output into a concrete type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> WorkflowOutboundValue for T
where T: Any,