teo_runtime/pipeline/ctx/extract.rs
1use crate::value::Value;
2use crate::pipeline::Ctx;
3
4pub trait ExtractFromPipelineCtx {
5 fn extract( ctx: &Ctx) -> Self;
6}
7
8impl ExtractFromPipelineCtx for Ctx {
9 fn extract(ctx: &Ctx) -> Self {
10 ctx.clone()
11 }
12}
13
14impl ExtractFromPipelineCtx for Value {
15 fn extract(ctx: &Ctx) -> Self {
16 ctx.value().clone()
17 }
18}