Skip to main content

StackResult

Trait StackResult 

Source
pub trait StackResult: List {
    // Required method
    unsafe fn take_result(stack: &mut RawStack) -> Self::Head;
}
Expand description

Extracts a typed segment’s result or its empty-stack marker.

§Examples

use cel_runtime::{Segment, SegmentCallable};
assert!(Segment::<()>::new().call(()).is_ok());

Required Methods§

Source

unsafe fn take_result(stack: &mut RawStack) -> Self::Head

Moves the final result out, or returns the empty-stack marker.

§Safety

The raw stack’s live values must match this type-level stack exactly.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl StackResult for CNil<()>

Source§

impl<H, T> StackResult for CStackList<H, T>
where H: 'static, T: List + CStackListHeadLimit,