mod async_execution;
pub use async_execution::Sendish;
pub mod buffer;
pub use buffer::*;
pub mod re_exports;
pub mod builder;
pub use builder::*;
pub mod callback;
pub use callback::*;
pub mod cancel;
pub use cancel::*;
pub mod chain;
pub use chain::*;
pub mod channel;
pub use channel::*;
#[cfg(feature = "diagram")]
pub mod diagram;
#[cfg(feature = "diagram")]
pub use diagram::*;
pub mod disposal;
pub use disposal::*;
pub mod errors;
pub use errors::*;
pub mod flush;
pub use flush::*;
pub mod gate;
pub use gate::*;
pub mod series;
pub use series::*;
pub mod input;
pub use input::*;
pub mod map;
pub use map::*;
pub mod map_once;
pub use map_once::*;
pub mod node;
pub use node::*;
pub mod operation;
pub use operation::*;
pub mod outcome;
pub use outcome::*;
pub mod promise;
pub use promise::*;
pub mod provider;
pub use provider::*;
pub mod reply;
pub use reply::*;
pub mod request;
pub use request::*;
pub mod service;
pub use service::*;
pub mod stream;
pub use stream::*;
pub mod workflow;
pub use workflow::*;
pub mod testing;
pub(crate) mod utils;
#[allow(unused)]
pub(crate) use utils::*;
#[cfg(feature = "trace")]
pub mod trace;
#[cfg(feature = "trace")]
pub use trace::*;
#[cfg(feature = "trace")]
pub const fn trace_supported() -> bool {
true
}
#[cfg(not(feature = "trace"))]
pub const fn trace_supported() -> bool {
false
}
pub mod trim;
pub use trim::*;
pub mod type_info;
pub use type_info::*;
use bevy_app::prelude::{App, Plugin, Update};
use bevy_ecs::prelude::{Entity, In};
extern crate self as crossflow;
#[non_exhaustive]
pub struct BlockingService<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamBuffers,
pub provider: Entity,
pub source: Entity,
pub session: Entity,
}
pub type BlockingServiceInput<Request, Streams = ()> = In<BlockingService<Request, Streams>>;
#[non_exhaustive]
pub struct AsyncService<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamChannels,
pub channel: Channel,
pub provider: Entity,
pub source: Entity,
pub session: Entity,
}
pub type AsyncServiceInput<Request, Streams = ()> = In<AsyncService<Request, Streams>>;
pub struct ContinuousService<Request, Response, Streams: StreamPack = ()> {
pub key: ContinuousServiceKey<Request, Response, Streams>,
}
pub type ContinuousServiceInput<Request, Response, Streams = ()> =
In<ContinuousService<Request, Response, Streams>>;
#[non_exhaustive]
pub struct BlockingCallback<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamBuffers,
pub source: Entity,
pub session: Entity,
}
pub type BlockingCallbackInput<Request, Streams = ()> = In<BlockingCallback<Request, Streams>>;
#[non_exhaustive]
pub struct AsyncCallback<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamChannels,
pub channel: Channel,
pub source: Entity,
pub session: Entity,
}
pub type AsyncCallbackInput<Request, Streams = ()> = In<AsyncCallback<Request, Streams>>;
#[non_exhaustive]
pub struct BlockingMap<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamBuffers,
pub source: Entity,
pub session: Entity,
}
#[non_exhaustive]
pub struct AsyncMap<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamChannels,
pub channel: Channel,
pub source: Entity,
pub session: Entity,
}
#[derive(Default)]
pub struct CrossflowPlugin {}
impl Plugin for CrossflowPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, flush_execution());
#[cfg(feature = "trace")]
{
app.add_event::<OperationStarted>();
}
}
}
#[derive(Default)]
pub struct CrossflowExecutorApp {}
impl Plugin for CrossflowExecutorApp {
fn build(&self, app: &mut App) {
app.add_plugins((
CrossflowPlugin::default(),
bevy_app::TaskPoolPlugin::default(),
bevy_diagnostic::FrameCountPlugin,
bevy_app::ScheduleRunnerPlugin::default(),
));
}
}
pub mod prelude {
pub use crate::{
AsyncCallback, AsyncCallbackInput, AsyncMap, AsyncService, AsyncServiceInput,
BlockingCallback, BlockingCallbackInput, BlockingMap, BlockingService,
BlockingServiceInput, Capture, ContinuousQuery, ContinuousService, ContinuousServiceInput,
CrossflowExecutorApp, CrossflowPlugin, Outcome,
buffer::{
Accessible, Accessor, AnyBuffer, AnyBufferKey, AnyBufferMut, AnyBufferWorldAccess,
AnyMessageBox, AsAnyBuffer, Buffer, BufferAccess, BufferAccessMut, BufferGateAccess,
BufferGateAccessMut, BufferKey, BufferMap, BufferMapLayout, BufferSettings,
BufferWorldAccess, Bufferable, Buffering, IncompatibleLayout, IterBufferable, Joinable,
Joined, RetentionPolicy,
},
builder::Builder,
callback::{AsCallback, Callback, IntoAsyncCallback, IntoBlockingCallback},
chain::{Chain, ForkCloneBuilder, UnzipBuilder, Unzippable},
flush::flush_execution,
map::{AsMap, IntoAsyncMap, IntoBlockingMap},
map_once::{AsMapOnce, IntoAsyncMapOnce, IntoBlockingMapOnce},
node::{ForkCloneOutput, InputSlot, Node, Output},
promise::{Promise, PromiseState},
provider::{ProvideOnce, Provider},
request::{RequestExt, RunCommandsOnWorldExt},
series::{Recipient, Series},
service::{
AddContinuousServicesExt, AddServicesExt, AsDeliveryInstructions, DeliveryInstructions,
DeliveryLabel, DeliveryLabelId, IntoAsyncService, IntoBlockingService, Service,
ServiceDiscovery, ServiceInstructions, SpawnServicesExt, traits::*,
},
stream::{DynamicallyNamedStream, NamedValue, Stream, StreamFilter, StreamOf, StreamPack},
trim::{TrimBranch, TrimPoint},
workflow::{DeliverySettings, Scope, ScopeSettings, SpawnWorkflowExt, WorkflowSettings},
};
pub use bevy_ecs::prelude::{In, World};
#[cfg(feature = "diagram")]
pub use crate::{
buffer::{
JsonBuffer, JsonBufferKey, JsonBufferMut, JsonBufferView, JsonBufferWorldAccess,
JsonMessage,
},
diagram::{
Diagram, DiagramElementRegistry, DiagramError, NodeBuilderOptions, Section, SectionItem,
},
};
pub use futures::FutureExt;
}
pub use bevy_app;
pub use bevy_derive;
pub use bevy_diagnostic;
pub use bevy_ecs;
pub use bevy_tasks;
pub use bevy_time;
pub use bevy_utils;