Struct validator_worker::worker::Worker
source · pub struct Worker<C: Unlocked> {
pub sentry: SentryApi<C, ()>,
pub config: Config,
pub adapter: Adapter<C, UnlockedState>,
pub logger: Logger,
}
Fields
sentry: SentryApi<C, ()>
SentryApi with set whoami
validator
Requires an unlocked adapter to create SentryApi
, use Worker::init_unlock()
.
config: Config
adapter: Adapter<C, UnlockedState>
The unlocked Adapter
logger: Logger
Implementations
sourceimpl<C: Unlocked + 'static> Worker<C>
impl<C: Unlocked + 'static> Worker<C>
sourcepub fn from_sentry(sentry: SentryApi<C, ()>) -> Self
pub fn from_sentry(sentry: SentryApi<C, ()>) -> Self
Requires an unlocked [Adapter
]
sourcepub fn run(self, is_single_tick: bool) -> Result<(), Box<dyn Error>>
pub fn run(self, is_single_tick: bool) -> Result<(), Box<dyn Error>>
Runs the validator in a single tick or it runs infinitely.
Uses [tokio::runtime::Runtime
]
pub async fn infinite(&self)
pub async fn all_channels_tick(&self)
Trait Implementations
Auto Trait Implementations
impl<C> !RefUnwindSafe for Worker<C>
impl<C> Send for Worker<C>
impl<C> Sync for Worker<C>
impl<C> Unpin for Worker<C>
impl<C> !UnwindSafe for Worker<C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more