pub struct Transfer {Show 15 fields
pub id: String,
pub kind: TransferKind,
pub profile_id: ProfileId,
pub bucket: BucketId,
pub key: String,
pub source_path: Option<PathBuf>,
pub dest_path: Option<PathBuf>,
pub total_bytes: Option<u64>,
pub transferred_bytes: u64,
pub parts_done: u32,
pub parts_total: u32,
pub state: TransferState,
pub started_at: i64,
pub finished_at: Option<i64>,
pub error: Option<AppError>,
}Expand description
Full state record for one download or upload transfer.
OCP: adding checksum, priority, or retries is a non-breaking additive
change — existing call sites are unaffected.
Fields§
§id: StringUUID v4 request identifier returned to the frontend.
kind: TransferKind§profile_id: ProfileId§bucket: BucketId§key: StringS3 object key.
source_path: Option<PathBuf>Source local path for uploads; None for downloads.
dest_path: Option<PathBuf>Destination local path for downloads; None for uploads.
total_bytes: Option<u64>Total bytes, if known before the transfer starts.
transferred_bytes: u64Bytes transferred so far.
parts_done: u32Multipart parts completed so far.
parts_total: u32Total multipart parts, if applicable.
state: TransferState§started_at: i64Unix timestamp (milliseconds) when the transfer was registered.
finished_at: Option<i64>Unix timestamp (milliseconds) when the transfer reached a terminal state.
error: Option<AppError>Error details when state is Failed. AppError serializes one-way
(backend → frontend) via its custom Serialize impl; we skip on
deserialize so the Transfer struct can still be deserialized when it
crosses IPC the other direction (e.g. test fixtures).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Transfer
impl<'de> Deserialize<'de> for Transfer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Transfer
impl RefUnwindSafe for Transfer
impl Send for Transfer
impl Sync for Transfer
impl Unpin for Transfer
impl UnsafeUnpin for Transfer
impl UnwindSafe for Transfer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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