pub struct Config<E, A, S, V, R>where
E: Rng + Spawner + Metrics + Clock + Storage,
A: Application<E>,
S: Scheme,
V: Variant<ApplicationBlock = A::Block>,{
pub application: A,
pub db_config: <A::Databases as DatabaseSet<E>>::Config,
pub input_provider: A::InputProvider,
pub marshal: Mailbox<S, V>,
pub max_pending_acks: NonZeroUsize,
pub mailbox_size: NonZeroUsize,
pub plan: SyncPlan<E, S, V>,
pub resolvers: R,
pub sync_config: SyncEngineConfig,
}Expand description
Configuration for constructing a Stateful application.
Fields§
§application: AThe inner application that drives state transitions.
db_config: <A::Databases as DatabaseSet<E>>::ConfigConfiguration used to construct the database set.
input_provider: A::InputProviderSource of input (e.g. transactions) passed to the application on propose.
marshal: Mailbox<S, V>Marshal mailbox used for startup anchoring and lazy recovery.
max_pending_acks: NonZeroUsizeMarshal ack window used by the provided marshal mailbox.
This must match the marshal config used to construct Self::marshal.
mailbox_size: NonZeroUsizeCapacity of the stateful actor mailbox channel.
plan: SyncPlan<E, S, V>Startup plan loaded via SyncPlan::init, optionally augmented with
a finalized floor via SyncPlan::with_floor. Carries the durable
metadata handle and the startup decision shared with marshal.
resolvers: RResolver(s) for state sync fetches and post-bootstrap serving.
sync_config: SyncEngineConfigSync engine tuning knobs.
Auto Trait Implementations§
impl<E, A, S, V, R> !Freeze for Config<E, A, S, V, R>
impl<E, A, S, V, R> !RefUnwindSafe for Config<E, A, S, V, R>
impl<E, A, S, V, R> Send for Config<E, A, S, V, R>where
R: Send,
impl<E, A, S, V, R> Sync for Config<E, A, S, V, R>where
A: Sync,
<<A as Application<E>>::Databases as DatabaseSet<E>>::Config: Sync,
<A as Application<E>>::InputProvider: Sync,
R: Sync,
impl<E, A, S, V, R> Unpin for Config<E, A, S, V, R>where
A: Unpin,
<<A as Application<E>>::Databases as DatabaseSet<E>>::Config: Unpin,
<A as Application<E>>::InputProvider: Unpin,
R: Unpin,
E: Unpin,
<S as Scheme>::Certificate: Unpin,
<V as Variant>::Commitment: Unpin,
<E as Storage>::Blob: Unpin,
impl<E, A, S, V, R> UnsafeUnpin for Config<E, A, S, V, R>where
A: UnsafeUnpin,
<<A as Application<E>>::Databases as DatabaseSet<E>>::Config: UnsafeUnpin,
<A as Application<E>>::InputProvider: UnsafeUnpin,
R: UnsafeUnpin,
E: UnsafeUnpin,
<S as Scheme>::Certificate: UnsafeUnpin,
<V as Variant>::Commitment: UnsafeUnpin,
<E as Storage>::Blob: UnsafeUnpin,
impl<E, A, S, V, R> !UnwindSafe for Config<E, A, S, V, R>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Converts
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>
Converts
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 more