pub struct Plan<S, D, V, Dir = Unit>{ /* private fields */ }Expand description
Shared startup recovery plan for DKG actors.
Initialize one plan after obtaining optional application state-sync material
and before starting either DKG actor. Clones share the resolution decision,
so both actors observe the same material while using one durable partition.
Use Plan::disabled for deployments that never use application state sync.
Implementations§
Source§impl<S, D, V, Dir> Plan<S, D, V, Dir>
impl<S, D, V, Dir> Plan<S, D, V, Dir>
Sourcepub async fn init<E: Context>(
context: E,
config: Config,
provided: Option<StateSync<S, D, V, Dir>>,
) -> Self
pub async fn init<E: Context>( context: E, config: Config, provided: Option<StateSync<S, D, V, Dir>>, ) -> Self
Initializes and durably records a DKG state-sync recovery candidate.
Provided material replaces any existing record. Without provided material, the existing record is loaded. The store is closed before this method returns, making the plan safe to pass to actors immediately.
§Panics
Panics if storage cannot be loaded or synchronized, if provided or persisted material has mismatched artifact and floor epochs, or if provided material violates the configured codec limits.
Trait Implementations§
Auto Trait Implementations§
impl<S, D, V, Dir = Unit> !RefUnwindSafe for Plan<S, D, V, Dir>
impl<S, D, V, Dir = Unit> !UnwindSafe for Plan<S, D, V, Dir>
impl<S, D, V, Dir> Freeze for Plan<S, D, V, Dir>
impl<S, D, V, Dir> Send for Plan<S, D, V, Dir>
impl<S, D, V, Dir> Sync for Plan<S, D, V, Dir>
impl<S, D, V, Dir> Unpin for Plan<S, D, V, Dir>
impl<S, D, V, Dir> UnsafeUnpin for Plan<S, D, V, Dir>
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
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<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> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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