pub struct PersistenceSchema { /* private fields */ }Expand description
Declares the Attributes, Channels, and Streams a Flow owns.
Return a schema from crate::Flow::persistence. Definitions must have unique names,
and all values accessed by Step or RPC code must appear in the schema.
§Examples
use dex_sdk::{Attribute, Channel, PersistenceSchema};
let status = Attribute::<String>::new("status");
let commands = Channel::<String>::new("commands");
let schema = PersistenceSchema::new().attribute(&status).channel(&commands);Implementations§
Source§impl PersistenceSchema
impl PersistenceSchema
Sourcepub fn attribute<T>(self, attribute: &Attribute<T>) -> Self
pub fn attribute<T>(self, attribute: &Attribute<T>) -> Self
Adds one single-value Attribute definition.
Sourcepub fn attribute_map<T>(self, attribute: &AttributeMap<T>) -> Self
pub fn attribute_map<T>(self, attribute: &AttributeMap<T>) -> Self
Adds one keyed Attribute-map definition.
Sourcepub fn channel_map<T>(self, channel: &ChannelMap<T>) -> Self
pub fn channel_map<T>(self, channel: &ChannelMap<T>) -> Self
Adds one keyed Channel-map definition.
Sourcepub fn join<T>(self, join: &Join<T>) -> Self
pub fn join<T>(self, join: &Join<T>) -> Self
Adds one Join definition.
A Join registers as the keyed Channel map that holds its branch results, under the Join’s name. The name must differ from every other definition in the Flow, including Channels and Channel maps; registration otherwise fails with a Flow definition error.
Since 1.44.0.
Trait Implementations§
Source§impl Clone for PersistenceSchema
impl Clone for PersistenceSchema
Source§impl Debug for PersistenceSchema
impl Debug for PersistenceSchema
Source§impl Default for PersistenceSchema
impl Default for PersistenceSchema
impl Eq for PersistenceSchema
Auto Trait Implementations§
impl Forget for PersistenceSchema
impl Freeze for PersistenceSchema
impl Move for PersistenceSchema
impl RefUnwindSafe for PersistenceSchema
impl Send for PersistenceSchema
impl Sync for PersistenceSchema
impl Unpin for PersistenceSchema
impl UnsafeUnpin for PersistenceSchema
impl UnwindSafe for PersistenceSchema
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request