pub struct AppState<J: JobProducerTrait + Send + Sync + 'static, RR: RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: TransactionCounterTrait + Send + Sync + 'static, PR: PluginRepositoryTrait + Send + Sync + 'static> {
pub relayer_repository: Arc<RR>,
pub transaction_repository: Arc<TR>,
pub signer_repository: Arc<SR>,
pub notification_repository: Arc<NFR>,
pub network_repository: Arc<NR>,
pub transaction_counter_store: Arc<TCR>,
pub job_producer: Arc<J>,
pub plugin_repository: Arc<PR>,
}
Expand description
Represents the application state, holding various repositories and services required for the application’s operation.
Fields§
§relayer_repository: Arc<RR>
Repository for managing relayer data.
transaction_repository: Arc<TR>
Repository for managing transaction data.
signer_repository: Arc<SR>
Repository for managing signer data.
notification_repository: Arc<NFR>
Repository for managing notification data.
network_repository: Arc<NR>
Repository for managing network data.
transaction_counter_store: Arc<TCR>
Store for managing transaction counters.
job_producer: Arc<J>
Producer for managing job creation and execution.
plugin_repository: Arc<PR>
Repository for managing plugins.
Implementations§
Source§impl<J: JobProducerTrait, RR: RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: TransactionCounterTrait + Send + Sync + 'static, PR: PluginRepositoryTrait + Send + Sync + 'static> AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J: JobProducerTrait, RR: RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: TransactionCounterTrait + Send + Sync + 'static, PR: PluginRepositoryTrait + Send + Sync + 'static> AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
Sourcepub fn relayer_repository(&self) -> Arc<RR>
pub fn relayer_repository(&self) -> Arc<RR>
Returns a clone of the relayer repository.
§Returns
An Arc
pointing to the RelayerRepositoryStorage
.
Sourcepub fn transaction_repository(&self) -> Arc<TR>
pub fn transaction_repository(&self) -> Arc<TR>
Returns a clone of the transaction repository.
§Returns
An Arc
pointing to the Arc<TransactionRepositoryStorage>
.
Sourcepub fn signer_repository(&self) -> Arc<SR>
pub fn signer_repository(&self) -> Arc<SR>
Sourcepub fn notification_repository(&self) -> Arc<NFR>
pub fn notification_repository(&self) -> Arc<NFR>
Returns a clone of the notification repository.
§Returns
An Arc
pointing to the InMemoryNotificationRepository
.
Sourcepub fn network_repository(&self) -> Arc<NR>
pub fn network_repository(&self) -> Arc<NR>
Returns a clone of the network repository.
§Returns
An Arc
pointing to the InMemoryNetworkRepository
.
Sourcepub fn transaction_counter_store(&self) -> Arc<TCR>
pub fn transaction_counter_store(&self) -> Arc<TCR>
Returns a clone of the transaction counter store.
§Returns
An Arc
pointing to the InMemoryTransactionCounter
.
Sourcepub fn job_producer(&self) -> Arc<J>
pub fn job_producer(&self) -> Arc<J>
Sourcepub fn plugin_repository(&self) -> Arc<PR>
pub fn plugin_repository(&self) -> Arc<PR>
Trait Implementations§
Source§impl<J: Clone + JobProducerTrait + Send + Sync + 'static, RR: Clone + RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: Clone + TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: Clone + NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Clone + Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Clone + Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: Clone + TransactionCounterTrait + Send + Sync + 'static, PR: Clone + PluginRepositoryTrait + Send + Sync + 'static> Clone for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J: Clone + JobProducerTrait + Send + Sync + 'static, RR: Clone + RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: Clone + TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: Clone + NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Clone + Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Clone + Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: Clone + TransactionCounterTrait + Send + Sync + 'static, PR: Clone + PluginRepositoryTrait + Send + Sync + 'static> Clone for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
Source§impl<J: Debug + JobProducerTrait + Send + Sync + 'static, RR: Debug + RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: Debug + TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: Debug + NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Debug + Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Debug + Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: Debug + TransactionCounterTrait + Send + Sync + 'static, PR: Debug + PluginRepositoryTrait + Send + Sync + 'static> Debug for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J: Debug + JobProducerTrait + Send + Sync + 'static, RR: Debug + RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static, TR: Debug + TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static, NR: Debug + NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static, NFR: Debug + Repository<NotificationRepoModel, String> + Send + Sync + 'static, SR: Debug + Repository<SignerRepoModel, String> + Send + Sync + 'static, TCR: Debug + TransactionCounterTrait + Send + Sync + 'static, PR: Debug + PluginRepositoryTrait + Send + Sync + 'static> Debug for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
Auto Trait Implementations§
impl<J, RR, TR, NR, NFR, SR, TCR, PR> Freeze for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J, RR, TR, NR, NFR, SR, TCR, PR> RefUnwindSafe for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>where
RR: RefUnwindSafe,
TR: RefUnwindSafe,
SR: RefUnwindSafe,
NFR: RefUnwindSafe,
NR: RefUnwindSafe,
TCR: RefUnwindSafe,
J: RefUnwindSafe,
PR: RefUnwindSafe,
impl<J, RR, TR, NR, NFR, SR, TCR, PR> Send for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J, RR, TR, NR, NFR, SR, TCR, PR> Sync for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J, RR, TR, NR, NFR, SR, TCR, PR> Unpin for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>
impl<J, RR, TR, NR, NFR, SR, TCR, PR> UnwindSafe for AppState<J, RR, TR, NR, NFR, SR, TCR, PR>where
RR: RefUnwindSafe,
TR: RefUnwindSafe,
SR: RefUnwindSafe,
NFR: RefUnwindSafe,
NR: RefUnwindSafe,
TCR: RefUnwindSafe,
J: RefUnwindSafe,
PR: RefUnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more