#[non_exhaustive]pub struct BlockDriverConfig {
pub mode: BlockDriverMode,
pub interval: Duration,
pub manual_request_timeout: Duration,
}Expand description
Local block production policy used by the hogd-dev supervisor.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: BlockDriverModeDriver wake mode.
interval: DurationTimer interval for BlockDriverMode::Interval.
manual_request_timeout: DurationExecution deadline once a request reaches the manual driver.
Time spent waiting behind an earlier request is not included.
Implementations§
Source§impl BlockDriverConfig
impl BlockDriverConfig
Sourcepub const fn instant() -> BlockDriverConfig
pub const fn instant() -> BlockDriverConfig
Return an instant submit-wake policy.
Sourcepub const fn interval(interval: Duration) -> BlockDriverConfig
pub const fn interval(interval: Duration) -> BlockDriverConfig
Return a fixed-interval policy.
Sourcepub const fn manual() -> BlockDriverConfig
pub const fn manual() -> BlockDriverConfig
Return an explicitly-triggered block production policy.
Sourcepub const fn with_mode(self, mode: BlockDriverMode) -> BlockDriverConfig
pub const fn with_mode(self, mode: BlockDriverMode) -> BlockDriverConfig
Return a copy with a different mode.
Sourcepub const fn with_interval(self, interval: Duration) -> BlockDriverConfig
pub const fn with_interval(self, interval: Duration) -> BlockDriverConfig
Return a copy with a different interval.
Sourcepub const fn with_manual_request_timeout(
self,
timeout: Duration,
) -> BlockDriverConfig
pub const fn with_manual_request_timeout( self, timeout: Duration, ) -> BlockDriverConfig
Return a copy with a different manual request deadline.
Trait Implementations§
Source§impl Clone for BlockDriverConfig
impl Clone for BlockDriverConfig
Source§fn clone(&self) -> BlockDriverConfig
fn clone(&self) -> BlockDriverConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BlockDriverConfig
Source§impl Debug for BlockDriverConfig
impl Debug for BlockDriverConfig
Source§impl Default for BlockDriverConfig
impl Default for BlockDriverConfig
Source§fn default() -> BlockDriverConfig
fn default() -> BlockDriverConfig
Returns the “default value” for a type. Read more
impl Eq for BlockDriverConfig
Source§impl PartialEq for BlockDriverConfig
impl PartialEq for BlockDriverConfig
impl StructuralPartialEq for BlockDriverConfig
Auto Trait Implementations§
impl Freeze for BlockDriverConfig
impl RefUnwindSafe for BlockDriverConfig
impl Send for BlockDriverConfig
impl Sync for BlockDriverConfig
impl Unpin for BlockDriverConfig
impl UnsafeUnpin for BlockDriverConfig
impl UnwindSafe for BlockDriverConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.