pub struct MigrationResult {
pub agent_uri: String,
pub old_endpoints: Vec<Endpoint>,
pub new_endpoints: Vec<Endpoint>,
pub update_latency: Duration,
pub success: bool,
}Expand description
Result of a simulated migration operation.
Captures the before/after state and performance metrics.
Fields§
§agent_uri: StringThe agent URI that was migrated.
old_endpoints: Vec<Endpoint>The old endpoint(s).
new_endpoints: Vec<Endpoint>The new endpoint(s).
update_latency: DurationTime taken to complete the update.
success: boolWhether the migration was successful.
Implementations§
Source§impl MigrationResult
impl MigrationResult
Sourcepub fn success(
agent_uri: impl Into<String>,
old_endpoints: Vec<Endpoint>,
new_endpoints: Vec<Endpoint>,
update_latency: Duration,
) -> Self
pub fn success( agent_uri: impl Into<String>, old_endpoints: Vec<Endpoint>, new_endpoints: Vec<Endpoint>, update_latency: Duration, ) -> Self
Creates a successful migration result.
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Returns true if the migration succeeded.
Sourcepub fn old_endpoints(&self) -> &[Endpoint]
pub fn old_endpoints(&self) -> &[Endpoint]
Returns the old endpoints.
Sourcepub fn new_endpoints(&self) -> &[Endpoint]
pub fn new_endpoints(&self) -> &[Endpoint]
Returns the new endpoints.
Sourcepub const fn update_latency(&self) -> Duration
pub const fn update_latency(&self) -> Duration
Returns the update latency.
Trait Implementations§
Source§impl Clone for MigrationResult
impl Clone for MigrationResult
Auto Trait Implementations§
impl Freeze for MigrationResult
impl RefUnwindSafe for MigrationResult
impl Send for MigrationResult
impl Sync for MigrationResult
impl Unpin for MigrationResult
impl UnsafeUnpin for MigrationResult
impl UnwindSafe for MigrationResult
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