pub struct MigrationHandlerHooks {
pub identity: Option<MigrationIdentityContext>,
pub post_restore: Option<PostRestoreCallback>,
pub pre_cleanup: Option<PreCleanupCallback>,
pub readiness: Option<ReadinessCallback>,
pub failure: Option<FailureCallback>,
}Expand description
Optional cross-cutting hooks consumed by
MigrationSubprotocolHandler::with_hooks. Each field is
independently opt-in so a test that cares about one hook doesn’t
have to fabricate the others; Default = nothing wired.
| Field | Side | Purpose |
|---|---|---|
identity | both | auto-seal / auto-open identity envelopes |
post_restore | target | kick off channel re-bind replay |
pre_cleanup | source | source-side Unsubscribe teardown |
readiness | target | gate inbound migrations on runtime state |
failure | source | surface structured reason to SDK caller |
Fields§
§identity: Option<MigrationIdentityContext>Identity-transport context. None = envelopes ignored
(pre-identity-envelope fallback).
post_restore: Option<PostRestoreCallback>Target-side post-restore callback — drives subscription replay.
pre_cleanup: Option<PreCleanupCallback>Source-side pre-cleanup callback — drives Unsubscribe teardown.
readiness: Option<ReadinessCallback>Target-side readiness predicate — returns false to reply
NotReady instead of attempting restore.
failure: Option<FailureCallback>Source-side failure observer — surfaces structured reason codes to the SDK.
Trait Implementations§
Source§impl Clone for MigrationHandlerHooks
impl Clone for MigrationHandlerHooks
Source§fn clone(&self) -> MigrationHandlerHooks
fn clone(&self) -> MigrationHandlerHooks
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 moreSource§impl Default for MigrationHandlerHooks
impl Default for MigrationHandlerHooks
Source§fn default() -> MigrationHandlerHooks
fn default() -> MigrationHandlerHooks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MigrationHandlerHooks
impl !RefUnwindSafe for MigrationHandlerHooks
impl Send for MigrationHandlerHooks
impl Sync for MigrationHandlerHooks
impl Unpin for MigrationHandlerHooks
impl UnsafeUnpin for MigrationHandlerHooks
impl !UnwindSafe for MigrationHandlerHooks
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