pub struct JoinSchema {
pub next: NextOperation,
pub buffers: BufferSelection,
pub clone: Vec<BufferIdentifier<'static>>,
pub serialize: bool,
pub trace_settings: TraceSettings,
}Expand description
Wait for exactly one item to be available in each buffer listed in
buffers, then join each of those items into a single output message
that gets sent to next.
If the next operation is not a node type (e.g. fork_clone) then
you must specify a target_node so that the diagram knows what data
structure to join the values into.
§Examples
{
"version": "0.1.0",
"start": "begin_measuring",
"ops": {
"begin_measuring": {
"type": "fork_clone",
"next": ["localize", "imu"]
},
"localize": {
"type": "node",
"builder": "localize",
"next": "estimated_position"
},
"imu": {
"type": "node",
"builder": "imu",
"config": "velocity",
"next": "estimated_velocity"
},
"estimated_position": { "type": "buffer" },
"estimated_velocity": { "type": "buffer" },
"gather_state": {
"type": "join",
"buffers": {
"position": "estimate_position",
"velocity": "estimate_velocity"
},
"next": "report_state"
},
"report_state": {
"type": "node",
"builder": "publish_state",
"next": { "builtin": "terminate" }
}
}
}Fields§
§next: NextOperationThe operation that the joined value will be passed to.
buffers: BufferSelectionMap of buffer keys and buffers.
clone: Vec<BufferIdentifier<'static>>List of the keys in the buffers dictionary whose value should be cloned
instead of removed from the buffer (pulled) when the join occurs. Cloning
the value will leave the buffer unchanged after the join operation takes
place.
serialize: boolWhether or not to automatically serialize the inputs into a single JsonMessage.
This will only work if all input types are serializable, otherwise you will
get a DiagramError.
trace_settings: TraceSettingsTrait Implementations§
Source§impl BuildDiagramOperation for JoinSchema
impl BuildDiagramOperation for JoinSchema
fn build_diagram_operation( &self, _: &OperationName, ctx: &mut DiagramContext<'_, '_, '_, '_, '_>, ) -> Result<BuildStatus, DiagramErrorCode>
Source§impl Clone for JoinSchema
impl Clone for JoinSchema
Source§fn clone(&self) -> JoinSchema
fn clone(&self) -> JoinSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JoinSchema
impl Debug for JoinSchema
Source§impl<'de> Deserialize<'de> for JoinSchema
impl<'de> Deserialize<'de> for JoinSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for JoinSchema
impl JsonSchema for JoinSchema
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
Use inline_schema() instead
inline_schema() instead“. Read moreAuto Trait Implementations§
impl Freeze for JoinSchema
impl RefUnwindSafe for JoinSchema
impl Send for JoinSchema
impl Sync for JoinSchema
impl Unpin for JoinSchema
impl UnsafeUnpin for JoinSchema
impl UnwindSafe for JoinSchema
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DynType for Twhere
T: JsonSchema,
impl<T> DynType for Twhere
T: JsonSchema,
Source§fn type_name() -> Cow<'static, str>
fn type_name() -> Cow<'static, str>
fn json_schema(generator: &mut SchemaGenerator) -> Schema
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> 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 moreSource§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>
T in a tonic::Request