Skip to main content

CopyOutcome

Struct CopyOutcome 

Source
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

Source

pub fn new( stats: CopyStats, method: CopyMethod, atomicity: AchievedAtomicity, ) -> Self

Creates a copy outcome.

§Parameters
  • stats: Copy statistics.
  • method: Method used to complete the copy.
  • atomicity: Atomicity achieved while publishing the destination.
§Returns

New copy outcome without diagnostics.

Source

pub fn with_diagnostics(self, diagnostics: UserMetadata) -> Self

Replaces provider-native diagnostics that have already passed key validation.

Source

pub const fn stats(&self) -> &CopyStats

Returns the completed copy statistics.

Source

pub const fn method(&self) -> CopyMethod

Returns the actual method used by the completed operation.

Source

pub const fn atomicity(&self) -> AchievedAtomicity

Returns the atomicity actually achieved while publishing the target.

Source

pub const fn durable(&self) -> bool

Returns whether provider-confirmed durability synchronization completed.

Source

pub fn with_durable(self, durable: bool) -> Self

Replaces the provider-reported durability completion fact.

Source

pub fn with_metadata(self, metadata: MetadataPreservePolicy) -> Self

Records the metadata preservation policy actually achieved by the provider.

Source

pub fn with_target_version(self, target_version: ResourceVersion) -> Self

Records the destination version reported after publication.

Source

pub const fn metadata(&self) -> MetadataPreservePolicy

Returns the metadata preservation result represented by this outcome.

Source

pub const fn target_version(&self) -> Option<&ResourceVersion>

Returns the target version when the provider reported one.

Source

pub const fn used_fallback(&self) -> bool

Returns whether the facade streamed after the provider declined its fast path.

Source

pub const fn diagnostics(&self) -> &NonSensitiveMetadata

Returns provider diagnostics that are safe to expose.

Trait Implementations§

Source§

impl Clone for CopyOutcome

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopyOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CopyOutcome

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CopyOutcome

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.