Crate wick_component

source ·
Expand description

wick-component SDK

This crate provides the wick-component SDK used to build components for the Wick runtime. It is the primary dependency used by the wick-component-codegen generator and re-exports common dependencies for Wick components.

Re-exported dependencies

These are exposed at the root of the crate, i.e. wick_component::packet or wick_component::wasmrs.

  • wick-packet as packet
  • flow-component
  • wasmrs
  • wasmrs-guest
  • wasmrs-runtime
  • wasmrs-codec
  • wasmrs-rx
  • bytes with feature bytes
  • chrono with feature datetime
  • Partial export of serde-json
  • Partial export of tokio-stream

See docs.rs for exact details.

Macros

  • propagate_if_error!

If the passed result is an error, the error propagates to all downstream outputs of a wick component and breaks execution with the provided statement. If the passed result is an Ok, the unwrapped result is returned.

Re-exports

Modules

  • Functions and macros for common operation types. Utility functions for binary operations (operations with two inputs).
  • Functions and macros for common operation types. Generic utility functions.
  • Macros used by wick components and generated code.
  • A module implementing custom serializers/deserializers for wick types.
  • Functions and macros for common operation types. Utility functions for unary operations (operations with one input).

Macros

  • This macro will generate the implementations for simple binary operations, operations that take two inputs, produce one output, and are largely want to remain ignorant of stream state.
  • This macro will generate the implementations for binary operations that pair single packets with potential streams of packets.
  • This macro will generate the implementations for operations, passing through packets without processing.
  • Re-export of serde_json utilities; Construct a serde_json::Value from a JSON literal.
  • Unwrap a Result value to its Result::Ok value or propagate the error to the downstream inputs and short circuit the logic.
  • This macro will generate the implementations for simple binary operations, operations that take two inputs, produce one output, and are largely want to remain ignorant of stream state.
  • This macro will generate the implementations for simple unary operations, operations that take one input and can produce any number of outputs.
  • This macro is used to include the generated code from a wick-component-codegen build step.

Structs

Enums

  • Re-export of serde_json utilities; Represents any valid JSON value.

Traits

  • Trait for operation outputs to handle situations where packets need to be sent to all output streams.
  • Re-export of wasmrs_rx traits and core types. A generic trait to wrap over Flux, Mono, and supporting types.
  • Re-export of wasmrs_rx traits and core types. The wasmrs-rx implementation of an Rx Observable trait
  • Re-export of wasmrs_rx traits and core types. The wasmrs-rx implementation of an Rx Observer trait
  • Trait implemented for output sets with a single output port.
  • Re-export of tokio_stream utilities; A stream of values produced asynchronously.
  • Re-export of tokio_stream utilities; An extension trait for the Stream trait that provides a variety of convenient combinator functions.

Functions

  • Re-export of tokio_stream utilities; Creates a stream that yields nothing.
  • Functions and macros for common operation types. Encode a Result type into a raw PacketPayload
  • Re-export of serde_json utilities; Deserialize an instance of type T from bytes of JSON text.
  • Re-export of serde_json utilities; Deserialize an instance of type T from a string of JSON text.
  • Re-export of serde_json utilities; Interpret a serde_json::Value as an instance of type T.
  • Create a stream of Result<T, AnyError> from an iterator of type T.
  • Re-export of tokio_stream utilities; Converts an Iterator into a Stream which is always ready to yield the next value.
  • Create a stream of Result<T, AnyError> that yields one value and ends.
  • Re-export of tokio_stream utilities; Creates a stream that emits an element exactly once.
  • Re-export of serde_json utilities; Convert a T into serde_json::Value which is an enum that can represent any valid JSON data.

Type Aliases

Attribute Macros

  • The proc macro to automatically implement common operaton types.