#[repr(C)]pub enum TransferEvent {
Progress {
transferred: u64,
total: Option<u64>,
},
Done {
outcome: HttpOutcome,
handle: Option<String>,
},
}Expand description
One event from an in-flight transfer, bincoded into the stream’s
PluginResponse.output (the same pattern Release A uses for HttpOutcome).
Variants§
Progress
A progress tick. total is None when the size is unknown (chunked response).
Done
The transfer finished. outcome is Release A’s request result; for a download
its body is empty (bytes went to disk) and handle is the destination the
shell wrote (sandbox path on native, blob: URL on web). For an upload, body is
the server’s reply, up to 64 KB (ADR-0044), and handle is None.
Implementations§
Source§impl TransferEvent
impl TransferEvent
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Serialize for the stream payload. Uses crux’s FFI format, not bincode directly —
see HttpOutcome::encode for why the version
and config matter.
Trait Implementations§
Source§impl Clone for TransferEvent
impl Clone for TransferEvent
Source§impl Debug for TransferEvent
impl Debug for TransferEvent
Source§impl<'de> Deserialize<'de> for TransferEvent
impl<'de> Deserialize<'de> for TransferEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TransferEvent
Source§impl<'ʄ> Facet<'ʄ> for TransferEvent
impl<'ʄ> Facet<'ʄ> for TransferEvent
Source§impl PartialEq for TransferEvent
impl PartialEq for TransferEvent
Source§impl Serialize for TransferEvent
impl Serialize for TransferEvent
impl StructuralPartialEq for TransferEvent
Auto Trait Implementations§
impl Forget for TransferEvent
impl Freeze for TransferEvent
impl Move for TransferEvent
impl RefUnwindSafe for TransferEvent
impl Send for TransferEventwhere
RawVecInner: Send,
impl Sync for TransferEventwhere
RawVecInner: Sync,
impl Unpin for TransferEvent
impl UnsafeUnpin for TransferEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<HttpHeader>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for TransferEventwhere
RawVecInner: UnwindSafe,
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