pub struct ArcAppBuilder { /* private fields */ }Expand description
Application builder holding type-erased registrations for every aggregate
served by the process. Each registration produces its own typed
CommandBus<A> while sharing the configured storage backend.
Implementations§
Source§impl ArcAppBuilder
impl ArcAppBuilder
Sourcepub fn register_aggregate<A: Aggregate + 'static>(self) -> Self
pub fn register_aggregate<A: Aggregate + 'static>(self) -> Self
Register a writable aggregate type. Arc creates and injects a distinct
CommandBus<A> for every call.
Sourcepub fn register_projectors(self, projectors: Vec<ProjectorReg>) -> Self
pub fn register_projectors(self, projectors: Vec<ProjectorReg>) -> Self
Register all projectors for the most recently registered aggregate.
Sourcepub fn register_projector(
self,
projector: impl Projector + 'static,
view: impl Into<String>,
) -> Self
pub fn register_projector( self, projector: impl Projector + 'static, view: impl Into<String>, ) -> Self
Register a single projector for the most recently registered aggregate.
Sourcepub fn register_routes<F>(self, f: F) -> Self
pub fn register_routes<F>(self, f: F) -> Self
Mount the application’s own routes. Framework handlers (static assets, websocket, health) are exported from this crate for the closure to reference; the application owns which routes it mounts.
Sourcepub fn register_data<T>(self, data: Arc<T>) -> Self
pub fn register_data<T>(self, data: Arc<T>) -> Self
Inject shared typed state contributed by an application or plugin.
Sourcepub fn register_plugin<P: ArcPlugin>(self, plugin: P) -> Self
pub fn register_plugin<P: ArcPlugin>(self, plugin: P) -> Self
Register a compile-time capability package.
Sourcepub async fn setup_plugins(
&self,
context: &PluginSetupContext<'_>,
) -> Result<()>
pub async fn setup_plugins( &self, context: &PluginSetupContext<'_>, ) -> Result<()>
Run setup hooks for every registered capability package in order.
Sourcepub fn snapshot_policy(self, policy: Option<SnapshotPolicy>) -> Self
pub fn snapshot_policy(self, policy: Option<SnapshotPolicy>) -> Self
Snapshot policy for the most recently registered aggregate.
Auto Trait Implementations§
impl !RefUnwindSafe for ArcAppBuilder
impl !Sync for ArcAppBuilder
impl !UnwindSafe for ArcAppBuilder
impl Freeze for ArcAppBuilder
impl Send for ArcAppBuilder
impl Unpin for ArcAppBuilder
impl UnsafeUnpin for ArcAppBuilder
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more