pub struct CopyOutcome { /* private fields */ }Expand description
Outcome returned by copy operations.
§Examples
use qubit_fs::copy::{CopyMethod, CopyOutcome, CopyStats};
use qubit_fs::metadata::AchievedAtomicity;
let outcome = CopyOutcome::new(CopyStats::default(), CopyMethod::Streamed, AchievedAtomicity::Atomic);
assert_eq!(CopyMethod::Streamed, outcome.method());Implementations§
Source§impl CopyOutcome
impl CopyOutcome
Sourcepub fn new(
stats: CopyStats,
method: CopyMethod,
atomicity: AchievedAtomicity,
) -> Self
pub fn new( stats: CopyStats, method: CopyMethod, atomicity: AchievedAtomicity, ) -> Self
Sourcepub fn with_diagnostics(self, diagnostics: UserMetadata) -> Self
pub fn with_diagnostics(self, diagnostics: UserMetadata) -> Self
Replaces provider-native diagnostics that have already passed key validation.
Sourcepub const fn method(&self) -> CopyMethod
pub const fn method(&self) -> CopyMethod
Returns the actual method used by the completed operation.
Sourcepub const fn atomicity(&self) -> AchievedAtomicity
pub const fn atomicity(&self) -> AchievedAtomicity
Returns the atomicity actually achieved while publishing the target.
Sourcepub const fn durable(&self) -> bool
pub const fn durable(&self) -> bool
Returns whether provider-confirmed durability synchronization completed.
Sourcepub fn with_durable(self, durable: bool) -> Self
pub fn with_durable(self, durable: bool) -> Self
Replaces the provider-reported durability completion fact.
Sourcepub fn with_metadata(self, metadata: MetadataPreservePolicy) -> Self
pub fn with_metadata(self, metadata: MetadataPreservePolicy) -> Self
Records the metadata preservation policy actually achieved by the provider.
Sourcepub fn with_target_version(self, target_version: ResourceVersion) -> Self
pub fn with_target_version(self, target_version: ResourceVersion) -> Self
Records the destination version reported after publication.
Sourcepub const fn metadata(&self) -> MetadataPreservePolicy
pub const fn metadata(&self) -> MetadataPreservePolicy
Returns the metadata preservation result represented by this outcome.
Sourcepub const fn target_version(&self) -> Option<&ResourceVersion>
pub const fn target_version(&self) -> Option<&ResourceVersion>
Returns the target version when the provider reported one.
Sourcepub const fn used_fallback(&self) -> bool
pub const fn used_fallback(&self) -> bool
Returns whether the facade streamed after the provider declined its fast path.
Sourcepub const fn diagnostics(&self) -> &NonSensitiveMetadata
pub const fn diagnostics(&self) -> &NonSensitiveMetadata
Returns provider diagnostics that are safe to expose.