pub enum ArtifactOp {
Publish {
name: String,
mime_type: String,
},
Save {
name: String,
},
Load {
name: String,
},
List,
Delete {
name: String,
},
Version {
name: String,
version: u32,
},
AsJson {
name: String,
},
AsText {
name: String,
},
FromJson {
name: String,
data: String,
},
FromText {
name: String,
data: String,
},
When {
predicate: Arc<dyn Fn() -> bool + Send + Sync>,
inner: Box<ArtifactOp>,
},
Sequence(Vec<ArtifactOp>),
}Expand description
A runtime artifact operation.
These represent deferred operations on artifacts that can be composed
into pipelines using the + operator.
Variants§
Publish
Publish an artifact with a given MIME type.
Save
Save an artifact to storage.
Load
Load an artifact from storage.
List
List available artifacts.
Delete
Delete an artifact.
Version
Get a specific version of an artifact.
AsJson
Convert an artifact to JSON format.
AsText
Convert an artifact to text format.
FromJson
Create an artifact from a JSON string.
FromText
Create an artifact from a text string.
When
Conditional operation — execute inner only when predicate is true.
Fields
inner: Box<ArtifactOp>Inner operation to conditionally execute.
Sequence(Vec<ArtifactOp>)
A sequence of operations composed with +.
Implementations§
Source§impl ArtifactOp
impl ArtifactOp
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Returns the artifact name associated with this operation, if any.
Sourcepub fn should_execute(&self) -> bool
pub fn should_execute(&self) -> bool
Returns true if this operation should execute (always true unless When).
Sourcepub fn flatten(&self) -> Vec<&ArtifactOp>
pub fn flatten(&self) -> Vec<&ArtifactOp>
Flatten this operation into a list of leaf operations.
Trait Implementations§
Source§impl Add for ArtifactOp
Compose two artifact operations with +.
impl Add for ArtifactOp
Compose two artifact operations with +.
Source§type Output = ArtifactOp
type Output = ArtifactOp
+ operator.Source§impl Clone for ArtifactOp
impl Clone for ArtifactOp
Source§fn clone(&self) -> ArtifactOp
fn clone(&self) -> ArtifactOp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ArtifactOp
impl !RefUnwindSafe for ArtifactOp
impl Send for ArtifactOp
impl Sync for ArtifactOp
impl Unpin for ArtifactOp
impl !UnwindSafe for ArtifactOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].